开发者

How to import Tkinter for distributed Jython jar formed from Python code

开发者 https://www.devze.com 2023-02-11 02:20 出处:网络
I have tried the steps mentioned at http://wiki.python.org/jython/JythonFaq/DistributingJythonScripts and formed myapp.jar from my python code and my main.py script uses Tkinter for GUI...but when i t

I have tried the steps mentioned at http://wiki.python.org/jython/JythonFaq/DistributingJythonScripts and formed myapp.jar from my python code and my main.py script uses Tkinter for GUI...but when i try to run it :

java -jar myapp.jar main.py it is showing

import Tkinter, tkFileDialog, tkMessageBox, tempfile, shutil ImportError: No module named Tkinter

How to avoid it....Early response will b开发者_如何学Ce highly appreciated.

Thanks in advance.


Tkinter is not included with Jython, and to the best of my knowledge nobody has ported it.

If you need to do a GUI in Jython, you'll probably need to use a Java library like Swing or SWT.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号