Close Paraview after python script execution
Hi all,
I would like to launch Paraview from a bash command so as to execute a script and then exit automatically at the end of the script. To launch Paraview and execute the script, I use: Code:
paraview --script=script_name.py Does anybody know how to make it close? Thank you very much for help! Best regards, William |
Greetings William,
Why not use pvpython or pvbatch? Beyond this, you can try the instructions given here: http://stackoverflow.com/questions/9...python-program Best regards, Bruno |
Quote:
Indeed, why not ! :D Exactly what I was looking for :D Many many many thanks :D Best regards, William |
In case someone is reading on and, like me,
1) doesn't have the python-qt4 libraries compatible with his paraview binaries installed, and 2) obtains the desired rendering only using paraview --script and not by using pvpython or pvbatch, for some mysterious reason, a solution may also be to execute something like this within the python script: Code:
import subprocess |
Sorry to respond even later but this is what came up when I was searching this and I found an even simpler way!
Just import sys and then run sys.exit(0). This closes paraview for me, and the 0 is an OK exit code. |
All times are GMT -4. The time now is 08:22. |