Easy one today where we are making a .bat file to run a script.
This assumes your file is called main.py and that your virtual python environment is in venv\Scripts\python.exe so adjust accordingly
SET ThisScriptsDirectory=%~dp0 SET PyScriptPath="%ThisScriptsDirectory%main.py" %ThisScriptsDirectory%venv\Scripts\python.exe %PyScriptPath% pause
Most up to date version of this file is at
https://github.com/LukeKeam/python-start-script-bat