Getting the error in embedded python

Boris Ottlewski Boris.Ottlewski at
Thu Mar 9 16:02:04 CET 2000


I just run a simple script with a syntax error:

  int res = PyRun_SimpleString("import this_module_does_not exist");
  if (res!=0)
       if (PyErr_Occurred())
         //never happens

I never get an PyErr_Occured. Also when I do PyErr_Fetch its empty. (res
is -1 if I got an error).

Why is that so? How do I get the error message?


Boris Ottlewski

More information about the Python-list mailing list