Files
cheatsheet-tldr/tldr/windows/py
2026-01-09 00:22:15 +00:00

27 lines
716 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
syntax: markdown
tags: [tldr, windows]
source: https://github.com/tldr-pages/tldr.git
---
# py
> Python Launcher for Windows that runs with specified Python version.
> See also: `python`.
> More information: <https://docs.python.org/using/windows.html#python-launcher-for-windows>.
- Start a REPL (interactive shell), optionally with arguments supported by `python` (like `-c`, `-m`, etc.):
`py {{python_arguments}}`
- Execute a specific Python file:
`py {{path o ile.py}}`
- 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`