I'm have a problem where jreload isn't recognized by the PythonInterpreter
from my Java class. Using jython 2.2.1 and jdk 1.4.2_16.
PythonInterpreter interpreter = new PythonInterpreter();
The code contained in jythonModule has an import statement at the beginning.
When this line is interpreted it throws an exception.
ImportError: no module named jreload
When I run the jython class standalone it imports jreload, but when I run it
from the java class using PythonInterpreter it can't find jreload.
Do I have to do something to sys.path?
View this message in context: http://www.nabble.com/Java-PythonInterpreter-not-recognizing-jython-module-tp20002198p20002198.html
Sent from the jython-users mailing list archive at Nabble.com.
From: Charlie Groves <charlie.groves@gm...> - 2008-10-17 04:10:27
On Wed, Oct 15, 2008 at 1:51 PM, shwick <uhimatoti@...> wrote:
> I'm have a problem where jreload isn't recognized by the PythonInterpreter
> from my Java class. Using jython 2.2.1 and jdk 1.4.2_16.
> Do I have to do something to sys.path?
Yes, you'll need to add the Lib directory that came with jython to
sys.path; jreload is a module in there.
It's worth pointing out that jreload is an experimental module, so
there's no guarantee that it'll be in future versions of Jython, and
if it is, that it'll have the same interface and semantics. I
wouldn't use it for anything beyond reloading Java classes under