Embedded Python and sys.exit()

Harald Angelow angelow at tttech.com
Fri Mar 31 11:05:05 CEST 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