"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >You would use try: and then on the next line except:
Thanks for the idea, but it did not help. I can not wrap every pythion line in python, so I wrote the following code on the C++ side: -------------- snip ----------------- try { int ret = PyRun_SimpleString ( p ) ; if(ret==-1) { ::MessageBox(0, "Error in Python call!", "", 0); } else { assert(ret == 0); } } catch( ...) { ::MessageBox(0, "exception", "", 0 ); } -------------- snip ----------------- I call this where "p" is an "execute" of a *.py file containing an error. I get the "Error in Python call!", but not the "exception". Any help, including links to information, welcome. TIA, Wolfram Kuss. -- http://mail.python.org/mailman/listinfo/python-list