[vtkusers] vtk.vtkVersion() not exposed to python?
Johann Cohen Tanugi
cohen at slac.stanford.edu
Mon Apr 24 12:14:46 EDT 2006
hello,
Waiting for some hints I try to make a clean rebuild, and read the
manual carefully for hints/warnings.... but I still cant see
vtkVersion.... It is like it is not exposed.
I have attached the cmake config file.
During the build I can see the following, related to vtkVersion and python:
bash-2.05b$ grep vtkVersion log
Building CXX object Common/CMakeFiles/vtkCommon.dir/vtkVersion.o
Generating vtkVersionPython.cxx
Building CXX object
Common/CMakeFiles/vtkCommonPythonD.dir/vtkVersionPython.o
Generating vtkVersionTcl.cxx
Building CXX object Common/CMakeFiles/vtkCommonTCL.dir/vtkVersionTcl.o
Also I can do the follwoing:
nm --demangle /data0/local/lib/libvtkCommonPythonD.so | grep vtkVersion
000b421c T PyVTKClass_vtkVersionNew
0016ae60 d PyvtkVersionMethods
000b3e6c t PyvtkVersion_IsA(_object*, _object*)
000b41fe t vtkVersionStaticNew()
000b3f04 t PyvtkVersion_NewInstance(_object*, _object*)
000b3dc8 t PyvtkVersion_GetClassName(_object*, _object*)
000b3f8e t PyvtkVersion_SafeDownCast(_object*, _object*)
000b401c t PyvtkVersion_GetVTKVersion(_object*, _object*)
000b4138 t PyvtkVersion_GetVTKBuildVersion(_object*, _object*)
000b408c t PyvtkVersion_GetVTKMajorVersion(_object*, _object*)
000b40e2 t PyvtkVersion_GetVTKMinorVersion(_object*, _object*)
000b418e t PyvtkVersion_GetVTKSourceVersion(_object*, _object*)
000b4294 W vtkVersion::SafeDownCast(vtkObjectBase*)
000b431a W vtkVersion::GetVTKVersion()
000b4348 W vtkVersion::GetVTKBuildVersion()
000b4334 W vtkVersion::GetVTKMajorVersion()
000b433e W vtkVersion::GetVTKMinorVersion()
000b4352 W vtkVersion::GetVTKSourceVersion()
000b426e W vtkVersion::IsA(char const*)
U vtkVersion::New()
000b436c W vtkVersion::IsTypeOf(char const*)
000b42e4 W vtkVersion::NewInstance() const
0016af00 d vtkVersionDoc
So a C++ class vtkVersion seems indeed to be there.... BBut when I go to
python, I get the output attached in pyout.txt....I have plenty
exposed.... but not vtkVersion.....
I also tried to look into the Python file directory :
bash-2.05b$ grep vtkVersion
/data0/local/lib/python2.4/site-packages/pyvtk/*
Binary file
/data0/local/lib/python2.4/site-packages/pyvtk/libvtkCommonPython.so
matches
bash-2.05b$ grep vtkVersion
/data0/local/lib/python2.4/site-packages/pyvtk/__init__.py
bash-2.05b$
Can someone tell me if I should get more when I grep for vtkVersion in
any of this way? I really have the feeling that for some weird reason
vtkVersion, though compiled, is not exposed to python, but I am out of
clue at that stage.
I hope someone can help....
best,
Johann
Johann Cohen Tanugi wrote:
> Hi I just built VTK and mayavi, and I the latter has a python
> executable to test VTK functionalities, and all went find. But when I
> try to launch mayavi itself, python tells me
> >>> import mayavi
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "/data0/local/lib/python2.4/site-packages/mayavi/__init__.py",
> line 7, in ?
> import Main
> File "/data0/local/lib/python2.4/site-packages/mayavi/Main.py", line
> 25, in ?
> import Sources.mv3DSImporter, Sources.VtkData
> File
> "/data0/local/lib/python2.4/site-packages/mayavi/Sources/VtkData.py",
> line 27, in ?
> from VtkXMLDataReader import get_array_type
> File
> "/data0/local/lib/python2.4/site-packages/mayavi/Sources/VtkXMLDataReader.py",
> line 23, in ?
> vtk_version = float(vtk.vtkVersion().GetVTKVersion()[:3])
> AttributeError: 'module' object has no attribute 'vtkVersion'
>
>
> I did not post to mayavi, because indeed browsing the content of the
> vtk python package, I dont see any vtkVersion around.....
>
>
> help please! Thanks in advance,
> Johann
> _______________________________________________
> This is the private VTK discussion list. Please keep messages
> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeCache.txt
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060424/c3bb89a8/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pyout.txt
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060424/c3bb89a8/attachment-0001.txt>
More information about the vtkusers
mailing list