mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-111201: A new Python REPL (GH-111567)
Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Marta Gómez Macías <mgmacias@google.com> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
parent
40cc809902
commit
f27f8c790a
41 changed files with 5328 additions and 170 deletions
|
@ -10,6 +10,28 @@ Appendix
|
|||
Interactive Mode
|
||||
================
|
||||
|
||||
There are two variants of the interactive :term:`REPL`. The classic
|
||||
basic interpreter is supported on all platforms with minimal line
|
||||
control capabilities.
|
||||
|
||||
On Unix-like systems (e.g. Linux or macOS) with :mod:`curses` and
|
||||
:mod:`readline` support, a new interactive shell is used by default.
|
||||
This one supports color, multiline editing, history browsing, and
|
||||
paste mode. To disable color, see :ref:`using-on-controlling-color` for
|
||||
details. Function keys provide some additional functionality.
|
||||
:kbd:`F1` enters the interactive help browser :mod:`pydoc`.
|
||||
:kbd:`F2` allows for browsing command-line history without output nor the
|
||||
:term:`>>>` and :term:`...` prompts. :kbd:`F3` enters "paste mode", which
|
||||
makes pasting larger blocks of code easier. Press :kbd:`F3` to return to
|
||||
the regular prompt.
|
||||
|
||||
When using the new interactive shell, exit the shell by typing :kbd:`exit`
|
||||
or :kbd:`quit`. Adding call parentheses after those commands is not
|
||||
required.
|
||||
|
||||
If the new interactive shell is not desired, it can be disabled via
|
||||
the :envvar:`PYTHON_BASIC_REPL` environment variable.
|
||||
|
||||
.. _tut-error:
|
||||
|
||||
Error Handling
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue