 +
 +void vtkPythonOutputWindow::DisplayWarningText(const char* message)
 +{
-+  PyGILBeginMacro;
-+
-+  if (!PyErr_Occurred())
-+    PyErr_SetString(PyExc_RuntimeWarning, message);
-+
-+  PyGILEndMacro;
++  // one could have considered setting a PyExc_RuntimeWarning, but
++  // this causes all VTK warnings (usually non-critical conditions) to
++  // trigger Python exceptions that terminate the whole program flow.
++  this->DisplayText(message);
 +}
 +
 +void vtkPythonOutputWindow::DisplayGenericWarningText(const char* message)
 +{
-+  PyGILBeginMacro;
-+
-+  if (!PyErr_Occurred())
-+    PyErr_SetString(PyExc_RuntimeWarning, message);
-+
-+  PyGILEndMacro;
++  // one could have considered setting a PyExc_RuntimeWarning, but
++  // this causes all VTK warnings (usually non-critical conditions) to
++  // trigger Python exceptions that terminate the whole program flow.
++  this->DisplayText(message);
 +}
 +
 +void vtkPythonOutputWindow::DisplayDebugText(const char* message)

 //--------------------------------------------------------------------
 // There are two hash tables associated with the Python wrappers
 
@@ -86,6 +189,23 @@
 {
   this->ObjectHash = new vtkstd::map<vtkSmartPointerBase, PyObject*>;
   this->ClassHash = new vtkstd::map<vtkstd::string, PyObject*>;;

retrieving revision 1.91
diff -u -r1.91 vtkWrapPython.c
--- Wrapping/vtkWrapPython.c	10 Dec 2008 20:58:40 -0000	1.91
+++ Wrapping/vtkWrapPython.c	27 May 2009 14:19:14 -0000
@@ -1056,6 +1056,13 @@
               fprintf(fp,"    else\n      {\n");
               sprintf(methodname,"op->%s",currentFunction->Name);
