Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REM Windows batch script to run 1+ Python program/scripts, sequentially, within their virtual environment. This can be called from Windows Task Scheduler.
- set original_dir=%CD%
- set venv_root_dir="C:\Python-Venvs\env-name"
- cd %venv_root_dir%
- call %venv_root_dir%\Scripts\activate.bat
- python your_python_script.py <arg1> <arg2> <arg3>
- installed_python_cli_program <arg1> <arg2> <arg3>
- call %venv_root_dir%\Scripts\deactivate.bat
- cd %original_dir%
- exit /B 1
Add Comment
Please, Sign In to add comment