Search code examples
paraviewpvpython

How do I open the paraview GUI with pvpython?


I generate a Paraview python script by using Tools -> Start trace. This records a set of steps I carry out using the Paraview GUI.

I can run this script fine from the GUI with Tools -> Python Shell

But if I try to run the script from command line using

pvpython my_script.py

The script runs and exits, but no GUI is opened.

[edit] - The answer:

I should have used

paraview --script=./my_script.py

instead of pvpython


Solution

  • The generated script does not contain any rendering by default. Take a look at the end of the script, there is commented rendering code to uncomment. I would suggest the following :

    RenderAllViews()