2025-04-25 19:33:51 -06:00
# py
> Python Launcher for Windows that runs with specified Python version.
> See also: `python`.
2025-05-08 12:26:01 -06:00
> More information: <https://docs.python.org/using/windows.html#python-launcher-for-windows>.
2025-04-25 19:33:51 -06:00
- Start a REPL (interactive shell), optionally with arguments supported by `python` (like `-c` , `-m` , etc.):
`py {{python_arguments}}`
- Execute a specific Python file:
2026-02-18 06:55:01 -07:00
`py {{path\to\file.py}}`
2025-04-25 19:33:51 -06:00
- Run specific Python version. If the version is missing, and `PYLAUNCHER_ALLOW_INSTALL` environment variable is set, auto-install via Microsoft Store or Winget:
`py {{-2|-3.7|...}}`
- List installed Python versions:
`py --list`