1

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

DJames
  • 571
  • 3
  • 17

1 Answers1

3

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()
Mathieu Westphal
  • 2,544
  • 1
  • 19
  • 33
  • When I try RenderAllViews(); raw_input(), an image is produced, but unfortunately no GUI for further manipulation. – DJames Feb 02 '18 at 14:53
  • pvpython does not contains any GUI and does not depend on Qt. If you want to command paraview in python, use the python shell within the GUI, if you want to exectue a python script at start, use `./bin/paraview --script=/absolute/path/to/script`. If you only want to interact with the view, you can use the python method `Interact()` in pvpython. – Mathieu Westphal Feb 02 '18 at 14:57