Skip to content

Instantly share code, notes, and snippets.

@JamesTheAwesomeDude
Last active October 9, 2023 17:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JamesTheAwesomeDude/fc3a6c30b7e84676d26228bd46d14559 to your computer and use it in GitHub Desktop.
Save JamesTheAwesomeDude/fc3a6c30b7e84676d26228bd46d14559 to your computer and use it in GitHub Desktop.
Open a CMD window directly in a Python venv
@echo off
REM After creating a venv via py -m venv "%USERPROFILE%\.venvs\MYVENVNAMEHERE"
REM Save this as %USERPROFILE%\.venvs\MYVENVNAMEHERE\Scripts\shell.bat
REM This script is OK to call from another folder, such as %USERPROFILE%
@echo on
REM Try "%%ProgramFiles(x86)%%\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" && start python -m "idlelib"
cmd /k "%~dp0\activate.bat"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment