[vtkusers] vtk.vtkVersion() not exposed to python?
Johann Cohen Tanugi
cohen at slac.stanford.edu
Sun May 7 00:00:12 EDT 2006
Thanks Martin, that might be it! I indeed installed pyvtk at some
point...... trying to get a feeling of what is 'out there'. Here are the
first lines from
[cohen at glast-jct cohen]$ more
/data0/local/lib/python2.4/site-packages/vtk/common.py
#!/usr/bin/env python
"""
Common functions/methods.
"""
"""
Copyright 2001 Pearu Peterson all rights reserved,
Pearu Peterson <pearu at ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the LGPL. See http://www.fsf.org
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
$Revision: 1.9 $
$Date: 2004/05/19 14:56:04 $
Pearu Peterson
"""
import types
import sys
import struct
....
If this is indeed pyvtk, can somebody tell me whether it is safe to ahve
both vtk wrapping module and pyvtk in, or whether they dont get along
together..... In the meantime I will clean up all this mess and report
on rebuild of vtk.
Best,
Johann
Martin Costabel wrote:
> Johann Cohen Tanugi wrote:
>
>> Python 2.4.2 (#3, Apr 21 2006, 11:56:28)
>> [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-47)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> from vtk import common
>> >>> common.vtkVersion.GetVTKVersion()
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in ?
>> AttributeError: 'module' object has no attribute 'vtkVersion'
>> >>> common
>> <module 'vtk.common' from
>> '/data0/local/lib/python2.4/site-packages/vtk/common.pyc'>
>> >>> dir(common)
>> ['Common', 'Data', 'DataSet', 'DataSetAttr', '__builtins__',
>> '__doc__', '__file__', '__name__', '_getline', 'is_celldata',
>> 'is_dataset', 'is_datasetattr', 'is_float01', 'is_int', 'is_int255',
>> 'is_number', 'is_pointdata', 'is_sequence', 'is_sequence2',
>> 'is_sequence3', 'is_string', 'struct', 'sys', 'types']
>
>
> This doesn't look like the vtk common module, it looks like the one
> from pyvtk. Maybe you have a bad installation of pyvtk that clobbered
> your vtk installation? Look inside
> /data0/local/lib/python2.4/site-packages/vtk/common.py whether it is
> from vtk or from pyvtk. The on from vtk should basically just do
>
> from libvtkCommonPython import *
>
More information about the vtkusers
mailing list