Jython: Packing several .py on .jar, problem importing .py modules within the .jar

2008-12-03 Thread Gubatron
Hello all, I've a problem with Jython and importing .py inside a jar. I'm putting .class and .py files inside .jar files. myjar.jar MyJar\SomeClass.class MyJar\main.py MyJar\otherModule.py So I add the myjar.jar to Jython's sys.path org.python.core.PySystemState

Re: Jython: Packing several .py on .jar, problem importing .py modules within the .jar

2008-12-03 Thread Gubatron
I've managed to solve this problem. I can now run a python script that lives inside a Jar. The python script is now able to import other scripts within the same jar, and it's also able to import java classes that live within the jar. The problem was solved by giving the Jython Interpreter the

Re: Jython: Packing several .py on .jar, problem importing .py modules within the .jar

2008-12-03 Thread Gubatron
cont... Take in consideration /** Hashtable of URLClassLoaders for each of the jars loaded */ private HashtableString, URLClassLoader classLoaders; Here's an example: org.python.core.PySystemState pySys = new org.python.core.PySystemState();