[vtkusers] Re: [vtk-developers] patch for turning (almost) all VTK errors into Python exceptions

Brad King brad.king at kitware.com
Wed Aug 2 18:54:35 EDT 2006


Charl P. Botha wrote:
> I've made a patch for VTK 5.0 which will turn almost all VTK errors
> into Python exceptions.
[snip]
> What do VTK/Python people think?  This definitely fills a niche, and
> it could be conditionally included in VTK.  The only drawback is the
> extra PyErr_Occurred() call after every VTK method call, and of course
> the extra line or two of Python code to set up the new
> vtkEventOutputWindow).

Technically it looks okay to me.  The non-c++-exception design nicely 
avoids the exception safety problems I mentioned.  I'll leave it to 
others who actually work with VTK/Python to comment about backwards 
compatibility and conditional compilation of the feature though.

-Brad




More information about the vtkusers mailing list