Re: Python callbacks & PyGILState_Release()

2005-04-25 Thread Randall Hopper
David E. Konerding DSD staff: |Randall Hopper wrote: |> Is there a clean way to save the full exception state in the callback |> before the PyGILState_Release(), and restore it when we return across the |> C++ wrapper? ... |I saved the exception state by retrieveing it from sys.exc_info(), whi

Re: Python callbacks & PyGILState_Release()

2005-04-25 Thread David E. Konerding DSD staff
In article <[EMAIL PROTECTED]>, Randall Hopper wrote: > Thomas Heller: > |> Python -> C++ -> Python Callback > |> > |> (example attached) an exception raised in the callback doesn't make it back > |> across C++ to Python. > ... > |> void callback_wrapper( void *user_data ) > |> { > |> // Acq

Re: Python callbacks & PyGILState_Release()

2005-04-23 Thread Randall Hopper
Thomas Heller: |> Python -> C++ -> Python Callback |> |> (example attached) an exception raised in the callback doesn't make it back |> across C++ to Python. ... |> void callback_wrapper( void *user_data ) |> { |> // Acquire interpreter lock |> PyGILState_STATE gstate = PyGILState_

Re: Python callbacks & PyGILState_Release()

2005-04-23 Thread Thomas Heller
Randall Hopper <[EMAIL PROTECTED]> writes: > What is the correct way to propagate exceptions from Python callbacks? > > When I do this: > > Python -> C++ -> Python Callback > > (example attached) an exception raised in the callback doesn't make it back > across C++ to Python. > >

Python callbacks & PyGILState_Release()

2005-04-22 Thread Randall Hopper
What is the correct way to propagate exceptions from Python callbacks? When I do this: Python -> C++ -> Python Callback (example attached) an exception raised in the callback doesn't make it back across C++ to Python. It appears that PyGILState_Release() at the bottom of the