activate.bat 997 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. @echo off
  2. rem This file is UTF-8 encoded, so we need to update the current code page while executing it
  3. for /f "tokens=2 delims=:" %%a in ('"%SystemRoot%\System32\chcp.com"') do (
  4. set "_OLD_CODEPAGE=%%a"
  5. )
  6. if defined _OLD_CODEPAGE (
  7. "%SystemRoot%\System32\chcp.com" 65001 > nul
  8. )
  9. set "VIRTUAL_ENV=D:\Works\Web_Develop\TriviaMVA\TriviaMVA\venv"
  10. if not defined PROMPT (
  11. set "PROMPT=$P$G"
  12. )
  13. if defined _OLD_VIRTUAL_PROMPT (
  14. set "PROMPT=%_OLD_VIRTUAL_PROMPT%"
  15. )
  16. if defined _OLD_VIRTUAL_PYTHONHOME (
  17. set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%"
  18. )
  19. set "_OLD_VIRTUAL_PROMPT=%PROMPT%"
  20. set "PROMPT=(venv) %PROMPT%"
  21. if defined PYTHONHOME (
  22. set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%"
  23. set PYTHONHOME=
  24. )
  25. if defined _OLD_VIRTUAL_PATH (
  26. set "PATH=%_OLD_VIRTUAL_PATH%"
  27. ) else (
  28. set "_OLD_VIRTUAL_PATH=%PATH%"
  29. )
  30. set "PATH=%VIRTUAL_ENV%\Scripts;%PATH%"
  31. :END
  32. if defined _OLD_CODEPAGE (
  33. "%SystemRoot%\System32\chcp.com" %_OLD_CODEPAGE% > nul
  34. set "_OLD_CODEPAGE="
  35. )