Python GUI with Swing

D-Man dsh8290 at rit.edu
Fri Mar 30 11:21:56 EST 2001


On Fri, Mar 30, 2001 at 03:21:45PM +0800, ??? wrote:
| Let me explain more about it. I mean my customer need Swing, but I need
                                                   ^^^^

How much is it really a _need_ vs. a _want_ or _like_?  Perhaps you
can convince them that a different toolkit would better suit their
needs?

| Is there a module for Python called PySwing, only use Swing's look and feel
| GUI ?? 

Swing's L&F ..., hmm ..., which one?  I personally like "Metal" but it
also has "Windows" and "Motif".  Supposedly Tk looks like Windows on
Windows and Motif on *nix.  wxWindows (wxPython) can look like Windows on
Windows, GTK or Motif on *nix and Mac (not sure if it is Classic or
the new OSX look) on MacOS (but AFAIK the Mac port isn't as
complete/stable).

| It maybe a big issue to rewrite Java's Swing library into C source
| and transfer into Python' s module.

I'm sure it would be.  Swing is quite large.  Perhaps someone with a
lot of interest could rewrite it in Python and devise some sort of
'Frame' replacement (since it needs to access the native windowing
system at some point).  It would be interesting, if not really nice,
to have a toolkit written (almost) entirely in Python.  The advantage
would be to not depend on any other "native" libraries, just a python
interpreter.

| Python to build a pilot system. Swing maybe slow but my customer can accept.
| If I use Swing thru Jython, it will be slower then directly using Java to
| develop the system. So I need a solution to use Swing in Python, that's all.

I kind of like Steve Purcell's suggestion of increasing minimum CPU
requirement to offset the overhead and appear just as fast.

Also, Java is faster than Jython (by definition pretty much) so
writing stuff that needs to be just a bit faster in Java is a pretty
good idea too.  (BTW, if you haven't tried Jython yet, you will be
quite amazed at its seamless integration with Java classes)

| Thanks all guys here.

No problem.  Glad to help.

-D





More information about the Python-list mailing list