Reinitializing the python interpreter form Java

Andre M. Descombes amdescombes at
Wed May 23 12:31:15 CEST 2001


I am using Jython as a script language from within Java, I compile a Python
program using the PythonInterpreter.exec method (so it runs faster), and
then use PythonInterpreter.get to get an address to a PyObject and then use
__call__ to call the code.

The problem is I would like to execute some functions several times, and I
would like to be able to save the state of the global variables, so I can
later restore it (on a different day for example).

I tried using getLocals and setLocals with no success.

Does anybody know how to do this?


Andre M. Descombes

More information about the Python-list mailing list