rest25/library/readline.rst => rest262/library/readline.rst
f1
2:mod:`readline` --- GNU readline interface
3==========================================
4
5.. module:: readline
6   :platform: Unix
7   :synopsis: GNU readline support for Python.
n8-.. sectionauthor:: Skip Montanaro <skip@mojam.com>
n8+.. sectionauthor:: Skip Montanaro <skip@pobox.com>
9
10
11The :mod:`readline` module defines a number of functions to facilitate
12completion and reading/writing of history files from the Python interpreter.
13This module can be used directly or via the :mod:`rlcompleter` module.  Settings
14made using  this module affect the behaviour of both the interpreter's
15interactive prompt  and the prompts offered by the :func:`raw_input` and
16:func:`input` built-in functions.
137
138.. function:: get_completer()
139
140   Get the completer function, or ``None`` if no completer function has been set.
141
142   .. versionadded:: 2.3
143
144
n145+.. function:: get_completion_type()
146+ 
147+   Get the type of completion being attempted.
148+ 
149+   .. versionadded:: 2.6
150+ 
145.. function:: get_begidx()
146
147   Get the beginning index of the readline tab-completion scope.
148
149
150.. function:: get_endidx()
151
152   Get the ending index of the readline tab-completion scope.
156
157   Set the readline word delimiters for tab-completion.
158
159
160.. function:: get_completer_delims()
161
162   Get the readline word delimiters for tab-completion.
163
t170+.. function:: set_completion_display_matches_hook([function])
171+ 
172+   Set or remove the completion display function.  If *function* is
173+   specified, it will be used as the new completion display function;
174+   if omitted or ``None``, any completion display function already
175+   installed is removed.  The completion display function is called as
176+   ``function(substitution, [matches], longest_match_length)`` once
177+   each time matches need to be displayed.
178+ 
179+   .. versionadded:: 2.6
164
165.. function:: add_history(line)
166
167   Append a line to the history buffer, as if it was the last line typed.
168
169
170.. seealso::
171
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op