CFD Online Discussion Forums

CFD Online Discussion Forums (
-   ParaView (
-   -   Close Paraview after python script execution (

taalf October 7, 2013 11:51

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:


But after the script execution, Paraview stays open...

Does anybody know how to make it close?

Thank you very much for help!

Best regards,


wyldckat October 11, 2013 18:20

Greetings William,

Why not use pvpython or pvbatch?

Beyond this, you can try the instructions given here:

Best regards,

taalf October 14, 2013 08:19


Originally Posted by wyldckat (Post 456450)
Why not use pvpython or pvbatch?

Why not ?

Indeed, why not ! :D

Exactly what I was looking for :D

Many many many thanks :D

Best regards,


louisgag October 7, 2015 10:23

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:


import subprocess"kill $(ps aux|grep -e 'paraview --script=./'|grep -v grep|awk {'print $2'})", shell=True)

All times are GMT -4. The time now is 14:03.