mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-30 17:33:50 +08:00
37 lines
750 B
Markdown
37 lines
750 B
Markdown
# python
|
|
|
|
> Interpreter języka Python.
|
|
> Więcej informacji: <https://docs.python.org/using/cmdline.html>.
|
|
|
|
- Uruchom REPL (interaktywną powłokę):
|
|
|
|
`python`
|
|
|
|
- Uruchom skrypt w danym pliku Python:
|
|
|
|
`python {{ścieżka/do/pliku.py}}`
|
|
|
|
- Uruchom skrypt w danym pliku Python i uruchom REPL:
|
|
|
|
`python -i {{ścieżka/do/pliku.py}}`
|
|
|
|
- Wykonaj wyrażenie w języku Python:
|
|
|
|
`python -c "{{wyrażenie}}"`
|
|
|
|
- Uruchom skrypt podanego modułu biblioteki:
|
|
|
|
`python -m {{moduł}} {{argumenty}}`
|
|
|
|
- Zainstaluj pakiet, używając `pip`:
|
|
|
|
`python -m pip install {{pakiet}}`
|
|
|
|
- Interaktywnie debuguj skrypt w języku Python:
|
|
|
|
`python -m pdb {{ścieżka/do/pliku.py}}`
|
|
|
|
- Uruchom wbudowany serwer HTTP na porcie 8080 w aktualnym katalogu:
|
|
|
|
`python -m http.server`
|