From: <ast...@gm...> - 2008-10-07 20:48:28
|
I have a test.py, and these are the lines: from java.awt import * from javax.swing import * print "This is running" f = JFrame("Test", defaultCloseOperation=JFrame.EXIT_ON_CLOSE) f.show() I pack the test.py into a standalone jython.jar (in the Lib/ folder) -- let's call it jythonsa.jar. When I typed in the command line: java -jar jythonsa.jar test.py The "This is running" is printed (which is fine), but I get a NameError: JFrame 1. Why is that so? And how do I fix it? 2. If I have a big module (i.e. a directory with lots of .py files and subdirs in it), how do I run the module? |