[vtkusers] [VTK + Python] vtkWrapPython .vs. vtkWrapPythonInit
Eric Boix
frog at creatis.insa-lyon.fr
Mon Jan 14 04:23:07 EST 2002
Dear users,
I'm trying to clone Sebastien Barre's vtkMy in such a way that
CMake is not required. I'm little bit puzzled by the respective roles
of the wrappers for Python, that is vtkWrapPython and vtkWrapPythonInit
(binairies obtained by repsectively compiling VTK/Wrapping/vtkWrapPython.c
and VTK/Wrapping/vtkWrapPythonInit.c).
As I understend it, wrapping vtk classes for Python (but also for
Tcl?) is a two stage process :
1/ invoke vtkWrapPython on each of the vtk classes include files (as many
invocations as they classes).
2/ invoke vtkWrapPythonInit (only once) with all the vtk classes include
files as argument.
Then it suffice to compile and link the C code generated by both stages
(not forgetting the vtk classes themselves) in order to obtain a
dynamic library (that one can "import" in Python).
The role of stage 2/ (vtkWrapPythonInit) is to generate the
initialisation function of the dynamic library i.e. the function that
is called by Python when importing, and that shall populate the dictionnary
with new avalaible classes.
So wrapping classes outside of the VTK hierarchy requires two
binaries : vtkWrapPython AND vtkWrapPythonInit.
Am I correct or lost in space ?
Thanks for your answers !
Eric Boix.
More information about the vtkusers
mailing list