By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,742 Members | 1,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,742 IT Pros & Developers. It's quick & easy.

Porting Tkinter application to JYthon

P: n/a
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
--

Search for products and services at:
http://search.mail.com
Nov 23 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

sandip desale wrote:
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
>

Thanks & Regards,
Sandip Desale
--

Search for products and services at:
http://search.mail.com
Nov 23 '06 #2

P: n/a
Hi Sandip,

sandip desale wrote:
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
py*********@python.org. 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

Nov 28 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.