Skip to content
UPEEC

The Python Interpreter

The program that runs Python code: python file.py, the interactive REPL, or python -m module.

Easy
Comments 0
  • python script.py runs a file; python -m pip … runs a module as a script.
  • python -c "print(1)" runs a one-liner; python -i drops into the REPL afterwards.
  • python -X importtime, -O (strip asserts) and -W (warnings) tune behaviour.

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.