From: Dirk V. <dv...@2s...> - 2009-02-12 16:51:53
|
Hi, im using jython-2.2. if i run script a.py which imports b.py the interpreter will generate b$py.class, but not a$py.class. Why? Is there a way to write the generated class files to a different directory? E.g.: $ jython src/cmd.py which imports src/util.py would generate classes/gen/util$py.class and read it from there if necessary? Regards, Dirk |
From: Tobias I. <th...@gm...> - 2009-02-12 17:42:34
|
This is the same behavior as in CPython, where scripts don't get compiled to a.pyc, but modules get compiled to b.pyc. The reason for this is that the runtime system only looks for pre-compiled files when importing. When executing a script you specify the exact file to execute, so there would be no point in storing compiled byte code for scripts. /Tobias On Thu, Feb 12, 2009 at 5:51 PM, Dirk Vleugels <dv...@2s...> wrote: > Hi, > > im using jython-2.2. > > if i run script a.py which imports b.py the interpreter will generate > b$py.class, but not a$py.class. Why? > > Is there a way to write the generated class files to a different > directory? E.g.: > > $ jython src/cmd.py which imports src/util.py > > would generate classes/gen/util$py.class and read it from there if > necessary? > > Regards, > Dirk > > > ------------------------------------------------------------------------------ > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |