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

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-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