Check from C that Interpreter is running
Michael Hudson
mwh at python.net
Tue Jul 22 14:18:29 EDT 2003
Florian Schulze <florian.proff.schulze at gmx.net> writes:
> Hi!
>
> I want to check from C that the Python Interpreter is still running
> and it's save to call things like PySys_GetObject, PyFile_WriteString
> etc. I need this in a C function which might be called during shutdown
> in a program embedding Python. Currently I get this error:
>
> Fatal Python error: PyThreadState_Get: no current thread
> Abort!
Py_IsInitialized?
Cheers,
mwh
--
The proponent of the PEP shall be placed in a gladiatorial arena
together with half a dozen hungry lions, and permitted to debate
the merits of the proposal with them.
-- Greg Ewing, comp.lang.python
More information about the Python-list
mailing list