2025-03-14 21:59:59 -06:00
|
|
|
# python
|
|
|
|
|
|
|
|
|
|
> Interprete del linguaggio Python.
|
2025-12-16 10:20:31 -07:00
|
|
|
> Maggiori informazioni: <https://docs.python.org/using/cmdline.html>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Avvia una REPL (shell interattiva):
|
|
|
|
|
|
|
|
|
|
`python`
|
|
|
|
|
|
|
|
|
|
- Esegue lo script contenuto in un file Python:
|
|
|
|
|
|
|
|
|
|
`python {{script.py}}`
|
|
|
|
|
|
|
|
|
|
- Esegue uno script all'interno della shell interattiva:
|
|
|
|
|
|
|
|
|
|
`python -i {{script.py}}`
|
|
|
|
|
|
|
|
|
|
- Esegue un'espressione Python:
|
|
|
|
|
|
|
|
|
|
`python -c "{{expression}}"`
|
|
|
|
|
|
|
|
|
|
- Esegue lo script di un modulo presente nella libreria:
|
|
|
|
|
|
|
|
|
|
`python -m {{modulo}} {{argomenti}}`
|
|
|
|
|
|
|
|
|
|
- Installa un pacchetto usando `pip`:
|
|
|
|
|
|
|
|
|
|
`python -m pip install {{nome_pacchetto}}`
|
|
|
|
|
|
|
|
|
|
- Esegue il debug interattivo di uno script Python:
|
|
|
|
|
|
|
|
|
|
`python -m pdb {{script.py}}`
|