[vtk-developers] Sgi and Python Solved...

Andy Cedilnik andy.cedilnik at kitware.com
Fri Sep 6 16:32:18 EDT 2002


Hi All,

I am pretty sure I solved the problem of VTK/Python not working. Just to
refresh your memory, the symptom was that when you said:

import vtk

python interpreter said "bla, bla, cannot initialize interpreter..." and
die. I was trying to track down the problem and there was a variable
"initialized" in the file "Python/Python/pythonrun.c". This variable
gets initialized by interpreter and is then used in python to determine
whether the interpreter is initialized. 

So, here comes the punch line. Each kit linked python library to it.
Since python library was static, each kit had its own version of library
and its own version of "initialized". Therefore the one in vtkpython
(which also had its own version of python library) was set to 1, other
were set to 0. Now the kit said something in let say
initlibvtkCommonPython (vtkCommonPythonInit.cxx), which asked if python
is initialized. Since the answer was "no", the interpreter said, "well,
that is the amount of insult I cannot handle..." and made a bu-bu.

Anyway, I fixed it and committed to CVS.

				Andy






More information about the vtk-developers mailing list