From: Bill J. <bi...@ja...> - 2002-02-28 03:18:12
|
I've got a fairly large Python application working with Jython, and I'd like to generate a jar file so that the application could be run with a command-line like java -classpath myjarfile.jar TopLevel.mainmodule This looks pretty easy to do with jythonc, and I've gotten it to work on some simple examples. However my large app does things like import TopLevel from inside TopLevel.mainmodule. And that doesn't work; I get an import error. I see that the documentation page for jythonc has some unfinished sections at the bottom, where it says: Freezing modules jythonc can also be used to freeze a python application. The frozen application can then be distributed and deployed as any other java application. Some diffrences between an interpreted application and a frozen application exists: Properties are diffrent. XXX sys.argv[0] loading of python classes. Anyone know the specifics of those differences? I suspect my troubles are coming from "loading of python classes". In particular, I notice that if TopLevel contains an __init__.py file, the import fails, but if there's no such module, the import succeeds. Bill |