I have an interpreter embedded in my java program, and I set the attributes, import the proper modules, and execute the right jython method in the imported script. But I want to reuse that interpreter, setting other attributes, doing other imports, etc. Is there a way I can set it back to some initial state, without having to re-instantiate it? I don't want something I'm executing to have unusual side effects because of something that I imported earlier in the program. Or, worse, have a pool of embedded interpreters where one of them intermittently acts funny because of the combination of scripts it ran over its lifetime. I was looking at the javadoc for org.python.util.PythonInterpreter and it looks like cleanup or initialize are along the lines of what I want, but cleanup doesn't have any documentation, and initialize can only be called once, and prior to creating a PythonInterpreter. Are there other options?
 
Thanks,
jwc
---
John Cherney          | Motorola Inc
Software Engineer     | phone:(248)994-7713
Network Transport     |   fax:(248)324-9550
CGISS                 | pager:(888)878-1354