Jython and JPython Questions...How similar to Python, Tkinter?

Ype Kingma ykingma at accessforall.nl
Wed Mar 28 05:33:09 EST 2001


Ron,

you wrote wrote:
> 
> Does Jython support Tkinter? OK, maybe that question as worded is
> nonsense, let me re-phrase it: If I code a program in Python and put a
> GUI front end on it with Tkinter, how hard would it be to do the same
> program in Jython? Or is there a better solution for Jython GUI's?
>

From: http://www.jython.org/docs/differences.html 
Under extension modules:

 However, Finn Bock has a JNI implementation called jTkinter which supports the
 full _tkinter API. Very cool stuff! 

and this is the link: http://jTkinter.sourceforge.net/

>     By the way, as I am new to Python and learning it, but I am
> interested in Jython for embedding (relatively simple) applets into
> webpages, how different is Jython from Python? How steep will the
> learning curve be for Jython, after learning a reasonable amount of
> Python?

>From a language point of view the implementations are almost as equal as
possible.
To make an applet in Jython have a look at:

http://www.jython.org/applets/index.html


> 
>     How hard is it to translate Python programs into Jython?

Check the differences page above. It mostly depends on how much use
you make of extension modules that are not available 'on the other side'.
Beware that from jython it is very easy to use java features:

from java.lang import System
System.out.writeln('Hello')

Not very useful (python print is better), but you can also do that with swing
for example.

>     How good is Jython? Can I write Jython programs, and then turn them

Just subscribe to the jython-users list.
Or browse the archives a bit and then realize that most of
the Python language itself is _not_ discussed. Jython works.

http://lists.sourceforge.net/lists/listinfo/jython-users

> into Java applets that easily embed into web pages? (I have a small but
> working knowledge of embedding Java applets in web pages, despite my
> overwhelming newbie status in all things coding related ;-)))

That plus some basic Python knowledge should give you a head start.

>     Please forgive my newbieness and all replies will be deeply
> appreciated!!!
> 
> Ron Stephens

My pleasure. Newbieness is easily lost in the Python environment.
Ype

-- 
email at xs4all.nl



More information about the Python-list mailing list