mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
36 lines
751 B
Markdown
36 lines
751 B
Markdown
# python
|
|
|
|
> Interpretador da linguagem Python.
|
|
> Mais informações: <https://www.python.org>.
|
|
|
|
- Inicia o REPL (shell interativo):
|
|
|
|
`python`
|
|
|
|
- Executa um arquivo Python específico:
|
|
|
|
`python {{caminho/para/arquivo.py}}`
|
|
|
|
- Executa um arquivo Python específico e inicia um REPL:
|
|
|
|
`python -i {{caminho/para/arquivo.py}}`
|
|
|
|
- Executa uma expressão em Python:
|
|
|
|
`python -c "{{expressão}}"`
|
|
|
|
- Roda o script do módulo de biblioteca especificado:
|
|
|
|
`python -m {{modulo}} {{argumentos}}`
|
|
|
|
- Instala um pacote usando `pip`:
|
|
|
|
`python -m pip install {{nome_do_pacote}}`
|
|
|
|
- Depura interativamente um script de Python:
|
|
|
|
`python -m pdb {{caminho/para/arquivo.py}}`
|
|
|
|
- Inicia o servidor HTTP integrado na porta 8000 no diretório atual:
|
|
|
|
`python -m http.server`
|