Batch - Python Virtual Environment¶
Source: Windows batch file for quick virtualenv creation (github.com)
@echo off
for /f "tokens=*" %%C in ( 'python3.9 -c "import os, re; print(re.search(r'[^\\]+$', os.getcwd(), re.M).group(0))"' ) do (
set DIRNAME=%%C
)
if [%2]==[] (
python%1 -m virtualenv env --prompt="(%DIRNAME%) "
) else (
python%1 -m virtualenv env --prompt="(%2) "
)
Appendix: Links¶
- Code
- Development
- Windows
- Microsoft DOS
- Command Line
- 2-Areas/MOCs/PowerShell
Backlinks:
list from [[Batch - Python Virtual Environment]] AND -"Changelog"