Guest User

Untitled

a guest
Jan 21st, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. REM Windows batch script to run 1+ Python program/scripts, sequentially, within their virtual environment. This can be called from Windows Task Scheduler.
  2.  
  3. set original_dir=%CD%
  4. set venv_root_dir="C:\Python-Venvs\env-name"
  5.  
  6. cd %venv_root_dir%
  7.  
  8. call %venv_root_dir%\Scripts\activate.bat
  9.  
  10. python your_python_script.py <arg1> <arg2> <arg3>
  11. installed_python_cli_program <arg1> <arg2> <arg3>
  12.  
  13. call %venv_root_dir%\Scripts\deactivate.bat
  14.  
  15. cd %original_dir%
  16.  
  17. exit /B 1
Add Comment
Please, Sign In to add comment