[Paraview] Determining the paraview-version from a Python-script

Bernhard Gschaider bgschaid_lists at ice-sf.at
Mon Aug 31 05:41:47 EDT 2009


Hi!

I have a script that I want to keep compatible with 3.4 and 3.6 (or at
least it should fail with a meaningful error message on 3.4). To do so
I want to find out which paraview-version the script is running
on. I did not find an API-call paraview.GetVersion() or similar. The
only two ways I found yet are

 - Going through paraview.vtk.vtkVersion.GetVersion() and determining
   from that number the paraview-version
 - Testing for the paraview.simple-library:

try:
        from paraview import simple
        paraViewPre36=False
except ImportError:
       paraViewPre36=True

Is there any other method that I have overlooked? I don't like either
of them because they are indirect and won't help me to find out about
later versions

Bernhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090831/0cef9f7a/attachment.pgp>


More information about the ParaView mailing list