Issue #5845: Enable tab-completion in the interactive interpreter by default, thanks to a new sys.__interactivehook__.

(original patch by Éric Araujo)
This commit is contained in:
Antoine Pitrou 2013-05-04 20:08:35 +02:00
parent 4c14b5de1c
commit 1a6cb30a34
9 changed files with 143 additions and 165 deletions

View file

@ -147,7 +147,12 @@ source.
If no interface option is given, :option:`-i` is implied, ``sys.argv[0]`` is
an empty string (``""``) and the current directory will be added to the
start of :data:`sys.path`.
start of :data:`sys.path`. Also, tab-completion and history editing is
automatically enabled, if available on your platform (see
:ref:`rlcompleter-config`).
.. versionchanged:: 3.4
Automatic enabling of tab-completion and history editing.
.. seealso:: :ref:`tut-invoking`
@ -438,7 +443,7 @@ conflict.
is executed in the same namespace where interactive commands are executed so
that objects defined or imported in it can be used without qualification in
the interactive session. You can also change the prompts :data:`sys.ps1` and
:data:`sys.ps2` in this file.
:data:`sys.ps2` and the hook :data:`sys.__interactivehook__` in this file.
.. envvar:: PYTHONY2K