New Features¶
A better interactive interpreter
Python now uses a new interactive shell by default, based on code from the PyPy project. When the
user starts the REPL from an interactive terminal, the following new features are now supported:
Multiline editing with history preservation.
Direct support for REPL-specific commands like help, exit, and quit, without the need to call
them as functions.
Prompts and tracebacks with color enabled by default.
Interactive help browsing using F1 with a separate command history.
History browsing using F2 that skips output as well as the >>> and … prompts.
“Paste mode” with F3 that makes pasting larger blocks of code easier (press F3 again to
return to the regular prompt).
To disable the new interactive shell, set the PYTHON_BASIC_REPL environment variable. For more on
interactive mode, see Interactive Mode.
(Contributed by Pablo Galindo Salgado, Łukasz Langa, and Lysandros Nikolaou in gh-111201 based on
code from the PyPy project. Windows support contributed by Dino Viehland and Anthony Shaw.)