Porting Tkinter application to JYthon

S

sandip desale

Dear All,

We have a Tcl/Tk application written using Python 2.2. Using this application we want to call some customizable Java APIs. I tried porting Tcl/Tk application to Jython but not able to do the same as TKinter library is not available with JYthon.

Can you please help me in porting Tkinter application to Jython? Also kindly let me know how to do the same.


Thanks & Regards,
Sandip Desale
 
T

Tim N. van der Leeuw

Hi,

sandip said:
Dear All,

We have a Tcl/Tk application written using Python 2.2. Using this application we want to call some customizable Java APIs. I tried porting Tcl/Tk application to Jython but not able to do the same as TKinter library is not available with JYthon.

Can you please help me in porting Tkinter application to Jython? Also kindly let me know how to do the same.

Not having Tkinter in Jython, you can either rewrite your app to be a
Java Swing app, or you can embed the Java JVM into the Python
interpreter as an importable library. I believe some projects exist to
enable the latter, although I don't know of a URL.

Cheers,

--Tim
 
T

Tim N. van der Leeuw

Hi Sandip,

sandip said:
Dear All,

We have a Tcl/Tk application written using Python 2.2. Using this application we want to call some customizable Java APIs. I tried porting Tcl/Tk application to Jython but not able to do the same as TKinter library is not available with JYthon.

Can you please help me in porting Tkinter application to Jython? Also kindly let me know how to do the same.


Thanks & Regards,
Sandip Desale

In response to my previous post I got an e-mail suggesting to look at
JPype; however that message wasn't posted to the list, despite a CC: to
(e-mail address removed). And it seems that you haven't received the
message either.

Anyways, here's the URL for the JPype project which allows the use of
Java libraries from Python:

http://jpype.sourceforge.net/

I downloaded it for windows and it seems to work quite OK, although I
only did some toy-testing (opening a Swing filechooser window from
within PythonWin, for instance).

The purpose of the project is calling Java code from Python, and it has
some limited facilities to allow callbacks from Java to Python. I think
therefore that it fits very well what you and I would need: integration
of Java libraries into Python projects.

It does not, however, allow subclassing of Java classes in Python or
the other way round, and it does not allow calling of arbitrary Python
code from the JVM.

Cheers,

--Tim
 

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

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top