[vtkusers] vtk.vtkVersion() not exposed to python?

Charl P. Botha cpbotha at cpbotha.net
Fri May 5 18:57:41 EDT 2006


On 5/5/06, Brian London <bml573 at northwestern.edu> wrote:
> Johann Cohen Tanugi Wrote:
>
> > >>> from vtk import common
> > >>> common.vtkVersion.GetVTKVersion()
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in ?
> > AttributeError: 'module' object has no attribute 'vtkVersion'
>
>
> You forgot a pair of parenthsese.  Try:
>
>  >>> import vtk
>  >>> vtk.vtkVersion().GetVTKVersion()
> '5.0.0'

vtkVersion is static, so you don't need an instance to call
GetVTKVersion, i.e. no parentheses are required (although you can use
'em if you want to).  vtk.vtkVersion.GetVTKVersion() is fine.

There's something else strange with Johann's setup.



More information about the vtkusers mailing list