Search code examples
paraviewpvpython

Paraview not releasing control back to Shell


I have a GUI containing several buttons to launch paraview and display specific results in it. Each button push calls a bat file in the shell containing a call to a python script file, itself containing the data to plot. This is what the .bat file looks like:

paraview --script="C:\Users****\Desktop\MyPythonScript.py"

My issue is that once I run the bat file in the shell, paraview launches and do not give control back to the shell once it has finish opening the result. This prevent the user from clicking on the others GUI's buttons to open another result. He needs to close paraview to return control to the shell and push another button to view other result.

This is pretty constraining and did not find any topics on that. Tried to use pvpython instead but nothing was being launched when given the same python script as above.

Please let me know if the python script is required for details but I guess no as this is more a general question.

Thanks in advance for any support. Regards, Marc.


Solution

  • start with the /B option

    Start application without creating a new window. The application has ^C handling ignored. Unless the application enables ^C processing, ^Break is the only way to interrupt the application

    start /B paraview ....
    start /B paraview ....
    

    from https://superuser.com/posts/345605/edit