BUGRPT: VTK 3.1 & Python callbacks
David Gobbi
dgobbi at irus.rri.on.ca
Mon May 15 15:21:54 EDT 2000
Hi Randall,
I noticed this problem about a year ago, but it hasn't come up in any
of my own code recently. I've committed a fix to CVS. If you want to
patch your own copy, add
if (PyErr_Occurred())
{
PyErr_Print();
}
after
result = PyEval_CallObject(func, arglist);
in 'vtkPythonVoidFunc(void *arg)' in common/vtkPythonUtil.cxx.
- David
On Mon, 15 May 2000, Randall Hopper wrote:
> Here's a trivial translation of the VTK expCos2.tcl example to Python.
> It appears that VTK 3.1 doesn't check for error when returning from a
> Python callback (e.g. bessel in the example), so if there is an error (bad
> variable name, divide by zero, etc.), the user won't have any way of
> knowing except that the network doesn't work.
>
> FWIW, I wanted to make sure that Programmable Source object callbacks
> were implemented and working well in the Python wrappers before using one
> in my tool. Translating the example was an easy way to do that. Except
> for the missing error propagation just described, they seem to work well.
>
> Thanks,
>
> Randall
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
More information about the vtkusers
mailing list