ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> Jython-users
Jython-users
Re: [Jython-users] freezing an application with pythonc? Do Python packages work?
by Samuele Pedroni other posts by this author
Feb 28 2002 5:34AM messages near this date
[Jython-users] freezing an application with pythonc? Do Python packages work? | Re: [Jython-users] freezing an application with pythonc? Do Python packages work?
You have encountered a bug,
a workaround is to define
a startup.py:

import TopLevel.mainmodule

and then jythonc --core --deep --jar whatever.jar startup.py

but depending our needs this can be useful or  not.

Let us know.

regards, Samuele Pedroni.


----- Original Message -----
From: Bill Janssen <bill@[...].org> 
To: <jython-users@[...].net> 
Sent: Thursday, February 28, 2002 4:17 AM
Subject: [Jython-users] freezing an application with pythonc? Do Python
packages work?


>  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
> 
>  _______________________________________________
>  Jython-users mailing list
>  Jython-users@[...].net
>  https://lists.sourceforge.net/lists/listinfo/jython-users
> 


_______________________________________________
Jython-users mailing list
Jython-users@[...].net
https://lists.sourceforge.net/lists/listinfo/jython-users
Thread:
Bill Janssen
Samuele Pedroni
Bill Janssen
Samuele Pedroni

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved