Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Jython support Tkinter

Tags:

jython

tkinter

Does Jython support Tkinter ? 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?

When i try java -jar "jarname" It is showing error as : import Tkinter, tkFileDialog, tkMessageBox, tempfile, shutil ImportError: No module named Tkinter

How can i resolve this............ Thanks in advance.....:)

like image 454
Kaveesh Wadhwa Avatar asked Feb 14 '11 14:02

Kaveesh Wadhwa


People also ask

Can we use tkinter in Java?

Tkinter is easy to use, easy to implement,easy to develop. In the following sections you will learn about Java Swing, which is one of the powerful GUI modules of java. Swing is also easy to use, easy to implement, easy to develop then java AWT (Abstract Window Toolkit) that was a primitive java GUI library.

Can Jython use Python libraries?

Jython does *not* support third-party Python libraries that use extensions written in C. This means that popular Python libraries like numpy, scipy and scikit-learn will not work in Jython (and, for this reason, will not work in Processing.py).

What version of Python does Jython use?

The Jython project provides implementations of Python in Java, providing to Python the benefits of running on the JVM and access to classes written in Java. The current release (a Jython 2.7. x) only supports Python 2 (sorry). There is work towards a Python 3 in the project's GitHub repository.

Does tkinter work with Python?

Tkinter is the de facto way in Python to create Graphical User interfaces (GUIs) and is included in all standard Python Distributions. In fact, it's the only framework built into the Python standard library.


1 Answers

No, it does not. You'll have to rewrite your application using swt, swing, etc. There is no Jython-CPython compatible gui, unless you are coding for the web.

like image 105
rapto Avatar answered Dec 31 '22 22:12

rapto