2025-03-14 21:59:59 -06:00
|
|
|
# python
|
|
|
|
|
|
|
|
|
|
> Python taal interpreter.
|
2025-12-16 10:20:31 -07:00
|
|
|
> Meer informatie: <https://docs.python.org/using/cmdline.html>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Start een REPL (interactieve shell):
|
|
|
|
|
|
|
|
|
|
`python`
|
|
|
|
|
|
|
|
|
|
- Voer een specifiek Python bestand uit:
|
|
|
|
|
|
|
|
|
|
`python {{pad/naar/bestand.py}}`
|
|
|
|
|
|
|
|
|
|
- Voer een specfiek Python bestand uit en start een REPL:
|
|
|
|
|
|
|
|
|
|
`python -i {{pad/naar/bestand.py}}`
|
|
|
|
|
|
|
|
|
|
- Voer een Python expressie uit:
|
|
|
|
|
|
|
|
|
|
`python -c "{{expressie}}"`
|
|
|
|
|
|
|
|
|
|
- Voer het script uit van een gespecificeerd bibliotheek module:
|
|
|
|
|
|
|
|
|
|
`python -m {{module}} {{argumenten}}`
|
|
|
|
|
|
|
|
|
|
- Installeer een pakket met `pip`:
|
|
|
|
|
|
|
|
|
|
`python -m pip install {{pakket}}`
|
|
|
|
|
|
|
|
|
|
- Debug interactief een Python script:
|
|
|
|
|
|
|
|
|
|
`python -m pdb {{pad/naar/bestand.py}}`
|
|
|
|
|
|
|
|
|
|
- Start de ingebouwde HTTP server op poort 8000 in de huidige map:
|
|
|
|
|
|
|
|
|
|
`python -m http.server`
|