Linked by Andrew Youll on Thu 30th Jun 2005 06:08 UTC, submitted by Zilin Du
General Development PySWT is a Python Binding to the IBM Eclipse SWT library, to provide Python with a cross platform native looking GUI.
Order by: Score:
FIRST POST!!!
by EEDOK on Thu 30th Jun 2005 06:14 UTC

Nicely done, great looking gui's in minimal code, does this depend on Java though?

Re: First Post
by Andrew Youll on Thu 30th Jun 2005 06:21 UTC

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.

How about calling SWT...
by Ilyak on Thu 30th Jun 2005 06:43 UTC

...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 does not look native on Mac
by Tony on Thu 30th Jun 2005 06:55 UTC

SWT looks native like Jacko looks black. Sorry, but SWT has a long way to go yet...

@Andrew
by Seo Sanghyeon on Thu 30th Jun 2005 07:13 UTC

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.

Nice one
by malkia on Thu 30th Jun 2005 07:34 UTC

Although libgcj.dll is about 10mb ;) - not so good if you want to distribute small gui apps.

"wateva" - Cartman
by Josiah Carlson on Thu 30th Jun 2005 07:41 UTC

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.

Size
by Seo Sanghyeon on Thu 30th Jun 2005 07:44 UTC

> 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.

Why bother, when GTK works great?
by Dave on Thu 30th Jun 2005 08:09 UTC

Well for a start GTK isn't native on OSX.

Re: Dave
by Renato on Thu 30th Jun 2005 08:31 UTC

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...

Interesting
by Bryan Feeney on Thu 30th Jun 2005 08:34 UTC

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?

RE: Interesting
by borg000 on Thu 30th Jun 2005 09:21 UTC

>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.

RE: RE: Interesting
by Bryan Feeney on Thu 30th Jun 2005 09:36 UTC

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 (@borg000)
by Simon Edwards on Thu 30th Jun 2005 10:51 UTC

PyQt works now on Qt3 on Linux, and on Win32 with the GPL ported version of Qt3.

--
Simon

re:
by Anonymous on Thu 30th Jun 2005 11:59 UTC

> 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.

you having a larf?
by simo on Thu 30th Jun 2005 12:01 UTC

since when has swt been more native looking than wxwidgets or qt?

@Dave
by Jon on Thu 30th Jun 2005 12:42 UTC

Well for a start GTK isn't native on OSX.

Yup - and that should be fixed.

Re: you having a larf?
by chemicalscum on Thu 30th Jun 2005 13:13 UTC

"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.

@Jon
by Dave on Thu 30th Jun 2005 14:21 UTC

Yes it should but no one seems to be interested enough to take it though to completion.

Just use Jython and optionally IKVM
by Anonymous on Thu 30th Jun 2005 14:57 UTC

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/

Native look?
by Anonymous on Thu 30th Jun 2005 15:26 UTC

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.

re: Native look?
by Andrew Youll on Thu 30th Jun 2005 16:14 UTC

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.

screenshots?
by Richard S on Thu 30th Jun 2005 17:27 UTC

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.

RE: Renato
by Guido Schimmels on Thu 30th Jun 2005 18:42 UTC

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.

RE:
by Anonymous on Fri 1st Jul 2005 08:02 UTC

They really should be called QtPy and SwtPy (cutie-pie and sweety-pie)

libgcj size
by Anonymous on Fri 1st Jul 2005 08:42 UTC

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).

Galde
by glalde on Fri 1st Jul 2005 12:35 UTC

why not prove glade?