[vtkusers] Python wrappers for new extensions developed with C++
Jordi Campos i Miralles
jcampos at maia.ub.es
Thu Jun 14 13:56:35 EDT 2007
Hi,
Is there any complete example like VTK/Examples/Build/vtkLocal but
including a Python test?
I followed the indications of the standard example
VTK/Examples/Build/vtkLocal, but it only has a TCL example. I created a
simple filter in C++ as vtkLocalExample.h/cxx.
I commented the "IF(VTK_WRAP_PYTHON)" line present in the CMakeList.txt
to be sure the "wrapper instructions" are executed.
With a "make" I obtain the wrapper libs "bin/libvtkLocalPython.so" and
"bin/libvtkLocalPython.so", but I still need the way to load them from
my python example.
If I try to do an "import vtkLocal" it does not work.
I check the standard python wrappers an I tried with:
"
import os
if os.name == 'posix':
from libvtkLocalPython import *
else:
from vtkLocalPython import *
"
and executed it with:
"
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./bin/ vtkpython test.py
"
But I can't load the library. I guess I should update also the
PYTHONPATH, but I need some "library" .py ...
What I'm doing wrong?
Is there any complete example like VTK/Examples/Build/vtkLocal but
including a Python test?
Thanks a lot!
jor;)i
BTW: I'm preparing a tutorial for my research group partners about
Volume Rendering with VTK that can be found here:
http://namaste.maia.ub.es/public/vtk-volume-rendering-tutorial.pdf
Would it be possible to add the pdf to VTK Wiki when I finish it?
--
Jordi Campos i Miralles
Departament de Matemàtica Aplicada i Anàlisi, MAiA
Facultat de Matemàtiques, Universitat de Barcelona
Gran Via de les Corts Catalanes, 585
08007 Barcelona
Telf : +34 93 403 93 72
More information about the vtkusers
mailing list