Embedded Python and sys.exit()

Harald Angelow angelow at tttech.com
Wed Mar 29 09:59:56 EST 2000


I have embedded Python in a  Win MFC program and execute script files and
simple strings.
(Py_RunFile, PyRun_String)

If the python script raises SystemExit or calls sys.exit() the whole process
is shut down.
How can I manage that only the Python Interpreter stops and returns from the
function call of
Py_RunFile or PyRun_String? Does Python know, that it is embedded?

thanks Harald





More information about the Python-list mailing list