Returning exceptions to C

Christian Tismer tismer at tismer.com
Tue Mar 21 15:44:07 EST 2000


Developer wrote:
> 
> I am trying to properly embed Python into a C++ program but with little
> success.  The problem I am running into is when I try to capture the raised
> exception in the C++ code.  The PyErr_Fetch() is not doing what I think it
> is.  The exception is raised in the Python code and the retrun value is
> Py_None.  Shouldn't the PyErr_Fetch() caputer the raise exception?  Here is
> a snip ...

Don't worry about this.
Gordon McMillan did all the work for you.
And with his SCXX, programming with python
objects in C++ becomes real fun!

http://www.mcmillan-inc.com/scxx.html

ciao - chris  (SCXX (ab-)user)

-- 
Christian Tismer             :^)   <mailto:tismer at appliedbiometrics.com>
Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
Kaunstr. 26                  :    *Starship* http://starship.python.net
14163 Berlin                 :     PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
     we're tired of banana software - shipped green, ripens at home




More information about the Python-list mailing list