PyDocs

Text Processing Services

readline

not Androidnot iOSnot WASI

Importing this module enables command line editing using libedit readline.
Symbols in readline

a

add_history
Add an item to the history buffer.
append_history_file
Append the last nelements items of the history list to file.

b

backend
The name of the underlying Readline library being used, either "readline" or "editline".

c

clear_history
Clear the current readline history.

g

get_begidx
Get the beginning index of the completion scope.
get_completer
Get the current completer function.
get_completer_delims
Get the word delimiters for completion.
get_completion_type
Get the type of completion being attempted.
get_current_history_length
Return the current (not the maximum) length of history.
get_endidx
Get the ending index of the completion scope.
get_history_item
Return the current contents of history item at one-based index.
get_history_length
Return the maximum number of lines that will be written to the history file.
get_line_buffer
Return the current contents of the line buffer.
get_pre_input_hook
Get the current pre-input hook function.

i

insert_text
Insert text into the line buffer at the cursor position.

p

parse_and_bind
Execute the init line provided in the string argument.

r

read_history_file
Load a readline history file.
read_init_file
Execute a readline initialization file.
redisplay
Change what's displayed on the screen to reflect contents of the line buffer.
remove_history_item
Remove history item given by its zero-based position.
replace_history_item
Replaces history item given by its position with contents of line.

s

set_auto_history
Enables or disables automatic history.
set_completer
Set or remove the completer function.
set_completer_delims
Set the word delimiters for completion.
set_completion_display_matches_hook
Set or remove the completion display function.
set_history_length
Set the maximal number of lines which will be written to the history file.
set_pre_input_hook
Set or remove the function invoked by the rl_pre_input_hook callback.
set_startup_hook
Set or remove the function invoked by the rl_startup_hook callback.

w

write_history_file
Save a readline history file.