Skip to content

REPL

Estimated time to read: 1 minute

REPL stands for READ - EVAL - PRINT - LOOP.

It refers to all the tools that allow you to open a terminal-based Python environment and dynamically try code, immediately see the results interactively.

The Python REPL (Read-Eval-Print Loop) that is installed by default with Python is basic and not very convenient for more complex tasks.

There are some alternatives, with the most common and popular being iPython, which is the same REPL used behind Jupyter Notebooks and allows you to use a notebook-style interface.

To install and use iPython, you can do the following:

pip install ipython
# Or using pipx
pipx install ipython

It's recommended to use pipx because it's one of those tools that you want to use globally since it's primarily used for testing functions or running some code tests before writing it.

Advantages of iPython

  • Tab-completion
  • Syntax highlighting
  • Automatic indentation
  • Magic commands
  • And much more