Hi, I'm working on an application program that embeds Python using the C-API. Sometimes, I need to call functions written in pure Python from the C code, so I use Py_CompileString and PyEval_EvalCode.
I would like to avoid compiling the same code over and over by storing the result of Py_CompileString in a static variable, however, the application does sometimes restart the Python interpreter. My question: is the PyCodeObject * returned from Py_CompileString still valid after Python is restarted? Andy Jost Sr. R&D Engineer Silicon Engineering Group Synopsys, Inc.
-- http://mail.python.org/mailman/listinfo/python-list