From: <bc...@wo...> - 2001-04-06 15:59:37
|
[Robert Kuzelj] >i am just now moving from jpython to jython and >i am experiencing some errors by doing that. >maybe somebody can help. > >here the context: >i am writing some modules, that help to >generate java-code from a togetherj-modell. >so what i am doing in effect is calling a >java-module from together which again calls >thru the PythonInterpreter my python-modules. > >on switching to jython20 i have renamed >my old jpython installation directory to >jpython.old and installed jython. i renamed >my new jython install-directory to jpython >and renamed the jython.jar to jpython.jar. >this was all done so that there be no need >to change all the property-files for running >my generator scripts. > >after switching to jython the os module can not >be called anymore. i simply can not understand >why this happens. It is a bug in Jython-2.0. The javaos.java class expect sys.prefix to have a value. This may not be the case when running embedded or jythonc'ed. The bug is fixed in the current CVS. As a work around you can assign a value to sys.prefix before the "os" module gets imported. import sys; sys.prefix = '.' ... regards, finn |