Catching Python exceptions from C++ ...
alexwalsh at accesswave.ca
Wed Jul 4 04:50:34 CEST 2001
I have embedded Python in my C++ application and fire off a script by
calling the PyRun_SimpleFileExFlags() function.
The problem is that it only returns a bool to indicate failure. I have
no way of knowing what caused it.
So, I have two questions:
1. How can I extract the exception that caused the script problem from
2. Can I perhaps set stdin, stdout, stderr to my own FILE handles and at
least dump the output/trace info to something I can read later? If so,
Thanx in advance,
More information about the Python-list