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

O

Oren Tirosh

I use jython + java swing for a large, ongoing contract. The plugable look
& feels allow you to add some nice UI skins to your application with 1 or
two lines of code - I use the 'Alloy' look and feel from incors
(http://www.incors.com/lookandfeel/index.php) - though it does cost.

I find it incredible that a PyGTK GUI often feels more responsive than many
Java GUI apps even though the Java language is much faster than Python.
AWT and Swing are largely responsible for Java being perceived as slow
even when the core language is now on par with C++ for most tasks. SWT is
fast. SWT has a native look because SWT *is* native. Skins should not be
the responsibility of the application. A native GUI will take on whatever
skin the host windowing system uses.

SWT has been ported from Java to C# for the SharpDevelop project. I wonder
how difficult it would be to port SWT to Python.

Oren
 
M

Michael Hudson

Oren Tirosh said:
SWT has been ported from Java to C# for the SharpDevelop project. I wonder
how difficult it would be to port SWT to Python.

Is SWT the framework that was developed for Eclipse?

I realise I could look this up myself, but well, that involves NN4 for
the moment...

Cheers,
mwh
 
M

Markus Wankus

Is SWT the framework that was developed for Eclipse?

I realise I could look this up myself, but well, that involves NN4 for
the moment...

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

PT

Markus Wankus said:
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.

I agree, I would like to try using a Python-wrapper for SWT (PySWT).
It might be serious competition for wxWindows, plus multitudes of java
developers would migrate to Python.
 
T

Thomas Heller

Markus Wankus said:
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.

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

Thomas
 
O

Oren Tirosh

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top