Embedded Python and sys.exit()

Harald Angelow angelow at tttech.com
Fri Mar 31 04:05:05 EST 2000


Thanks

If anybody is interested, here is working code:

res=PyRun_String(code,file_input,pdict_,pdict_);
if (res==NULL)
{
    if ((res=PyErr_Occurred())!=NULL)
    {
        if (PyErr_ExceptionMatches(PyExc_SystemExit))
        {
                printf("EXIT\n");
        }
       else
       {
           PyErr_Print();
       }
       PyErr_Clear();
    }
}








More information about the Python-list mailing list