Atm, from looking at the site it uses Jython as its Python >>—> Java interface, but Zilin (the PySWT creator) is wanting to create a C++ Wrapper instead of relying on Jython.
What, you mean like wxPython? Sorry, I’ve already got my Python GUI toolkit, and it looks native on every important platform: Windows, X11, Motif, Qt, Gtk, Mac Classic, and Mac Cocoa.
For comparison, on my computer (Debian Sid), size of Qt library (/usr/lib/libqt-mt.so.3.3.4) is 7.0 MB, and libgcj (/usr/lib/libgcj.so.4.0.0) is 7.7 MB. So they are comparable.
If distributing an app using Qt is feasible, so is one using GCJ.
I don’t understand SWT (on Python anyhow) or WX – why not just use GTK straight-up instead of going through those goofy intermediary APIs? The WIMP theme that’s built into GTK 2.6 makes GTK look almost exactly like native Windows widgets. Plus, when using GTK natively, you get the backing of Glade to design your GUIs with.
It’s an interesting achievement, but I’m not sure where it’s going. Arguably PyQt has the lead now that Qt is GPL everywhere, I suppose PySWT falls in free commerical use camp with wxPython. However Qt has the advantage of Qt Designer (which is not insignificant when it comes to drawing up GUIs).
One thing that puzzles me though is the memory management. SWT famously requires memory management, even on Java, a managed language. I can’t tell from the samples if this is still the case with PySWT: all the sample GUIs are fairly static (i.e. they appear, do nothing, and get destroyed with the rest of the app when it dies). Does anyone know what the story is?
>It’s an interesting achievement, but I’m not sure where it’s going. Arguably >PyQt has the lead now that Qt is GPL everywhere, I suppose PySWT falls in free >commerical use camp with wxPython. However Qt has the advantage of Qt >Designer (which is not insignificant when it comes to drawing up GUIs).
Of course PyQt is not available for Qt 4 yet so it’s not in the lead quite yet.
> One thing that puzzles me though is the memory management. SWT famously requires memory management, even on Java, a managed language. I can’t tell from the samples if this is still the case with PySWT: all the sample GUIs are fairly static (i.e. they appear, do nothing, and get destroyed with the rest of the app when it dies). Does anyone know what the story is?
You’re confused. Java provides memory management – not resource management. They are different. SWT doesn’t need you to manage memory either, just some external, native, unmanaged resources that are allocated by the native operating system (colors, fonts, etc). Is this any different than having to remember to close a stream or database connection? It may seem silly at first (especially because Swing gets around it by emulating everything and not having to communicate with the native windowing system), but it makes sense – and the way they’ve implemented SWT makes it really a non issue anyway because the rules are so easy to follow.
Just use Jython and Java to create your SWT app, instead of creating a whole other customized wrapper on top of SWT. Then if you wanted to also you can use IKVM to generate an .exe that runs in .NET or Mono: http://www.ikvm.net/
SWT takes on the native look of what ever OS you’re using, if you’re using QT it looks like QT, if you’re using GTK+ it looks like GTK+, if you’re using Win32, it looks like Win32, etc.
Where did the moderated comments go? I had something to say about the screenshots (nothing wrong with that, right? We’re talking about UI’s here), but it’s gone. I assume it has been moderated, as some people can’t take the truth.
WxWidgets-2.6.0 has been released a few weeks ago.
Gtk2 is now default, the resize problems seem to be gone.
The wx app I’m mainly using (poEdit) even uses Gtk stock icons, with no change to the application, simply by recompiling. I’ve seen apps where the ugly win-classic icons are still there though. This app at least is now practically indistuingishable from a native Gnome app, except for the about box and the help browser; the wx help browser is so much better than yelp – yelp is horrible.
So as a user I’m very satisfied, VLC is looking good too.
Just for those pointing to the size of libgcj: That is fixable. SWT does not put very heavy requirements on the java class library, so you can probably strip out a *considerable* part of those 10 Mb for the purpose of creating a lightweight libgcj.so (or .dll).
Nicely done, great looking gui’s in minimal code, does this depend on Java though?
Atm, from looking at the site it uses Jython as its Python >>—> Java interface, but Zilin (the PySWT creator) is wanting to create a C++ Wrapper instead of relying on Jython.
…Naive looking toolkit?
There are a real lot of GUI bindings. DotGNU once had 2x more bindings than real apps. The question is what gets used.
And to get used, you have to get your bindings bundled with linux distros. Other platforms generally NOT care about exotic things.
SWT looks native like Jacko looks black. Sorry, but SWT has a long way to go yet…
As far as I can tell, it is using GCJ with SIP (Python wrapper generator, originally developed for PyQt). So it does not require JRE.
Although libgcj.dll is about 10mb – not so good if you want to distribute small gui apps.
cross platform native looking GUI
What, you mean like wxPython? Sorry, I’ve already got my Python GUI toolkit, and it looks native on every important platform: Windows, X11, Motif, Qt, Gtk, Mac Classic, and Mac Cocoa.
> Although libgcj.dll is about 10mb
For comparison, on my computer (Debian Sid), size of Qt library (/usr/lib/libqt-mt.so.3.3.4) is 7.0 MB, and libgcj (/usr/lib/libgcj.so.4.0.0) is 7.7 MB. So they are comparable.
If distributing an app using Qt is feasible, so is one using GCJ.
I don’t understand SWT (on Python anyhow) or WX – why not just use GTK straight-up instead of going through those goofy intermediary APIs? The WIMP theme that’s built into GTK 2.6 makes GTK look almost exactly like native Windows widgets. Plus, when using GTK natively, you get the backing of Glade to design your GUIs with.
Well for a start GTK isn’t native on OSX.
And wx looks weird (read: ugly) on linux/gtk, especially since the default is still gtk+1.2 with non antialiased fonts.
Plus the widgets do not resize correctly, and the general layout of wx apps is consistently ugly
I know: I tried Boa with wx compiled for gtk2… ugly. Text spilled outside widgets…
It’s an interesting achievement, but I’m not sure where it’s going. Arguably PyQt has the lead now that Qt is GPL everywhere, I suppose PySWT falls in free commerical use camp with wxPython. However Qt has the advantage of Qt Designer (which is not insignificant when it comes to drawing up GUIs).
One thing that puzzles me though is the memory management. SWT famously requires memory management, even on Java, a managed language. I can’t tell from the samples if this is still the case with PySWT: all the sample GUIs are fairly static (i.e. they appear, do nothing, and get destroyed with the rest of the app when it dies). Does anyone know what the story is?
>It’s an interesting achievement, but I’m not sure where it’s going. Arguably >PyQt has the lead now that Qt is GPL everywhere, I suppose PySWT falls in free >commerical use camp with wxPython. However Qt has the advantage of Qt >Designer (which is not insignificant when it comes to drawing up GUIs).
Of course PyQt is not available for Qt 4 yet so it’s not in the lead quite yet.
True, but it’s on the roadmap, and for what it’s worth, the PySWT bindings aren’t finished yet either: http://www.cs.nyu.edu/zilin/pyswt/pmwiki.php?n=PmSWT.TODO
PyQt works now on Qt3 on Linux, and on Win32 with the GPL ported version of Qt3.
—
Simon
> One thing that puzzles me though is the memory management. SWT famously requires memory management, even on Java, a managed language. I can’t tell from the samples if this is still the case with PySWT: all the sample GUIs are fairly static (i.e. they appear, do nothing, and get destroyed with the rest of the app when it dies). Does anyone know what the story is?
You’re confused. Java provides memory management – not resource management. They are different. SWT doesn’t need you to manage memory either, just some external, native, unmanaged resources that are allocated by the native operating system (colors, fonts, etc). Is this any different than having to remember to close a stream or database connection? It may seem silly at first (especially because Swing gets around it by emulating everything and not having to communicate with the native windowing system), but it makes sense – and the way they’ve implemented SWT makes it really a non issue anyway because the rules are so easy to follow.
since when has swt been more native looking than wxwidgets or qt?
Well for a start GTK isn’t native on OSX.
Yup – and that should be fixed.
“since when has swt been more native looking than wxwidgets or qt?”
Since forever for anyone using Gnome 2 or XFce4 as their primary desktop.
Yes it should but no one seems to be interested enough to take it though to completion.
Just use Jython and Java to create your SWT app, instead of creating a whole other customized wrapper on top of SWT. Then if you wanted to also you can use IKVM to generate an .exe that runs in .NET or Mono: http://www.ikvm.net/
On my Linux machine Qt is the native look, so saying it has a “cross platform native looking GUI” without naming the toolkit is at least questionable.
SWT takes on the native look of what ever OS you’re using, if you’re using QT it looks like QT, if you’re using GTK+ it looks like GTK+, if you’re using Win32, it looks like Win32, etc.
Where did the moderated comments go? I had something to say about the screenshots (nothing wrong with that, right? We’re talking about UI’s here), but it’s gone. I assume it has been moderated, as some people can’t take the truth.
WxWidgets-2.6.0 has been released a few weeks ago.
Gtk2 is now default, the resize problems seem to be gone.
The wx app I’m mainly using (poEdit) even uses Gtk stock icons, with no change to the application, simply by recompiling. I’ve seen apps where the ugly win-classic icons are still there though. This app at least is now practically indistuingishable from a native Gnome app, except for the about box and the help browser; the wx help browser is so much better than yelp – yelp is horrible.
So as a user I’m very satisfied, VLC is looking good too.
As a developer I still have my reservations.
They really should be called QtPy and SwtPy (cutie-pie and sweety-pie)
Just for those pointing to the size of libgcj: That is fixable. SWT does not put very heavy requirements on the java class library, so you can probably strip out a *considerable* part of those 10 Mb for the purpose of creating a lightweight libgcj.so (or .dll).
why not prove glade?