C built and raised exceptions are not being catched in Python code

Brian Quinlan brian at sweetapp.com
Wed Feb 26 18:23:57 EST 2003


Hmmm...at first glance your code looks fine. I've never encountered this
problem before. Here are some thoughts:
1. are you checking for errors in your actual code?
2. try call PyErr_NewException("exc.ChangeStatus",NULL,NULL) i.e. not
dict
3. check that you have correctly initialized the interpreter (you could
   test your extension using plain old unembedded Python)
4. try moving foo to exc

Sorry I couldn't help more.

Cheers,
Brian






More information about the Python-list mailing list