diff options
author | Skip Montanaro <skip@pobox.com> | 2004-05-24 14:20:16 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2004-05-24 14:20:16 (GMT) |
commit | 79cddc56b30f45899154289fdf684a98a10e9e2c (patch) | |
tree | 2ee05ee2973dde3dfcfa939449994b031734313f /Doc/lib | |
parent | b98a8ba14db919d6bf6b277c59ab20da16ed19cd (diff) | |
download | cpython-79cddc56b30f45899154289fdf684a98a10e9e2c.zip cpython-79cddc56b30f45899154289fdf684a98a10e9e2c.tar.gz cpython-79cddc56b30f45899154289fdf684a98a10e9e2c.tar.bz2 |
stupid, stupid, stupid... raw_input() already supports readline() if the
readline module is loaded.
Diffstat (limited to 'Doc/lib')
-rw-r--r-- | Doc/lib/libreadline.tex | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/Doc/lib/libreadline.tex b/Doc/lib/libreadline.tex index 34d3a4c..d0b26a3 100644 --- a/Doc/lib/libreadline.tex +++ b/Doc/lib/libreadline.tex @@ -15,10 +15,6 @@ interpreter. The \module{readline} module defines the following functions: -\begin{funcdesc}{readline}{\optional{prompt}} -Get a single line of input from the user. -\end{funcdesc} - \begin{funcdesc}{parse_and_bind}{string} Parse and execute single line of a readline init file. \end{funcdesc} @@ -160,7 +156,7 @@ del os, histfile \end{verbatim} The following example extends the \class{code.InteractiveConsole} class to -support command line editing and history save/restore. +support history save/restore. \begin{verbatim} import code @@ -183,12 +179,6 @@ class HistoryConsole(code.InteractiveConsole): pass atexit.register(self.save_history, histfile) - def raw_input(self, prompt=""): - line = readline.readline(prompt) - if line: - readline.add_history(line) - return line - def save_history(self, histfile): readline.write_history_file(histfile) \end{verbatim} |