[Paraview] ParaView Python problem
Ian Krukow
i.krukow at tu-braunschweig.de
Thu Jun 26 06:30:39 EDT 2014
Hi all,
I like to keep different modules apart in python, therefore I use
import paraview.simple as pv
instead of
from paraview.simple import *
I never had problems with this, until I included the Python Calculator
in my script. Whenever I call "pv.Show()" on the Python Calculator, "pv"
(my ParaView module) is overwritten with some strange function object,
and with the next call of pv, I get an error. An example script is given
below. I am using ParaView 4.1.0, Windows binaries.
Now, there are, of course, several possibilities to prevent this from
happening, but I do not see any reason for this behaviour. Any ideas?
Kind regards
Ian
Example script:
import paraview.simple as pv
sphere = pv.Sphere()
pv.GetRenderView()
pv.Show()
pycalc = pv.PythonCalculator()
pycalc.Expression = 'Normals'
pycalc.ArrayName = 'Deformation'
pv.Show()
clip = pv.Clip()
pv.Show()
pv.Render()
On the "pv.Clip" call, I get
AttributeError: 'function' object has no attribute 'Clip'
It works fine in the GUI's Python Shell
--
Dipl.-Ing. Ian Krukow
Tel +49 531 391-3673
Technische Universität Braunschweig
Institut für Statik/SFB 880
Beethovenstr. 51
38106 Braunschweig
Deutschland
www.statik.tu-braunschweig.de
sfb880.tu-braunschweig.de
More information about the ParaView
mailing list