SWT and Python (was: Re: What GUI toolkit looks the best?)

Oren Tirosh oren at hishome.net
Wed Dec 17 21:13:56 EST 2003


On Tue, Dec 16, 2003 at 03:11:46PM +0100, Thomas Heller wrote:
> Markus Wankus <markus_wankus at hotmail.com> writes:
> > I believe that's what he means...and I have been wondering about this
> > for awhile.  SWT is very wxWindows-ish in it's parent-child
> > relationships - and I think it just looks and feels really cool.
> >
> > You can easily do it all in Python/Jython - provided you use the .dll
> > and .jar file.  A pure Python wrapping of the .dll (i.e. replacing the
> > .jar file) would be seriously cool.
> 
> Hm, it seems the .dll (which is 270 kB) is a thin wrapper over the
> windows api, and the .jar file, which is (although probably compressed)
> has 1MB, containing windows specific code.

Yes, that's the SWT architecture.

> Sounds more like a total rewrite of SWT in python than a simple wrapper
> to me.

Most of this work was done manually in a few weeks for the C# port. But
there is no need to do it manually. I think that mechanical translation of
Java to clean and even idiomatic Python would not be too hard. I've looked
at the code and SWT uses a pretty small subset of the Java libraries (some 
basic I/O and containers) and a small number of language constructs over 
and over again. 

    Oren





More information about the Python-list mailing list