From: Nicola de C. <nde...@rs...> - 2004-09-27 15:11:05
|
Hi all, as stated in Jython Essential the __main__ module is not available when creating an instance of a PythonIterpreter from Java. As I need it to be available (some modules require it), is there any way to create it in PythonInterpreter ? I executed the following in the PythonInerpreter: from org.python.core import imp main = imp.addModule("__main__") main.__dict__ = globals() and it worked ... but I wonder if it makes any sense and if it could introduce a potential source of errors. Thanks in advance Nicola |