Make `--venv` a pvpython/pvbatch/paraview CLI argument
Currently, python scripts can import paraview.web.venv
to setup module paths etc. to load packages from a virualenv. The current approach requires that import paraview.web.venv
is done in the Python script that pvpython/pvbatch executes, which makes it impossible for the Python script itself to be a part of the virtual env. For example, I have a nice Python package with Viz pipelines that I pip install in a venv. I simply want to run that package with pvpython as follows:
pvpython -m my_nice_package
It's not possible currently. Hence, I propose we move the venv handling to pvpython/pvbatch itself. Thus, make the following work:
pvpython --venv /.../venv -m my_nice_package
It makes sense to add this cmd-line arg to all executables that support Python including the server executables.
Edited by Utkarsh Ayachit