From: Mark M. <Mar...@ds...> - 2004-10-24 20:28:09
|
<FONT face=3D"Default Sans Serif, Verdana, Arial, Helvetica, sans-serif" si= ze=3D2><DIV>Hi,</DIV><DIV> </DIV><DIV>I am using Jython from a Java pr= ogram and instantiate an InteractiveConsole to work with a GUI application.= The first time I instantiate the console, I import a module called "= crap" for argument's sake. I later trash the console, and fire up ano= ther one. The problem is - "crap" is still hanging around and is avai= lable (although somewhat stale..) in the new console. Should Jython i= t not clear out sys.modules every time? Is there a call to somehow "s= hutdown" the console I am missing? Is there some way to "initialize" = the interpreter every time to a known set of defaults? I have tried c= alling PythonInterpreter.initialize() every time I create a console but thi= s doesn't appear to do anything.</DIV><DIV> </DIV><DIV>Thanks in advan= ce,</DIV><DIV>Mark.</DIV></FONT>= |