Glossary

REPL

Also known as: interactive interpreter, Python shell

The REPL (Read-Eval-Print Loop) is Python's interactive mode, launched by running python3 with no script argument. It presents a >>> prompt, reads a Python expression or statement, evaluates it, prints the result (if any), and loops back for more input. The REPL is one of Python's most beloved features: it lets you experiment with ideas, test small code fragments, and inspect objects without creating a file.

The standard CPython REPL gained significant improvements in Python 3.13, including multi-line editing, colour output, and better error messages. Third-party alternatives like IPython and bpython offer richer features — syntax highlighting, tab completion, inline documentation, and magic commands. Jupyter notebooks extend the REPL concept into a web-based document mixing code cells, prose, and visualisations.

The REPL is not just a convenience; it shapes how Python programmers think. The ability to import a module, construct an object, and poke at its attributes in real time encourages an exploratory style of programming. The built-in help() function and dir() function are designed to be used at the REPL, making Python partly self-documenting.

Related terms: Interpreter, Python

Discussed in:

This site is currently in Beta. Please email Chris Paton (cpaton@gmail.com) with any suggestions, questions or comments.