Baffled by readline module

Chris Angelico rosuav at gmail.com
Thu Mar 9 16:58:26 EST 2023


On Fri, 10 Mar 2023 at 08:10, Grant Edwards <grant.b.edwards at gmail.com> wrote:
> What's really weird about the docs is that when it is described it
> doesn't even _mention_ that it provides command-line recall and
> editing:
>
> It just talks about manipulating history files and about
> tab-completion of Python identfiers.  The last sentence mentions that
> settings affect both the REPL prompt and the prompts offered by the
> built-in input() function.
>

Ah. Yes, that's because the **module** doesn't provide command-line
recall and editing. It does affect the input() builtin, as is
mentioned, but mainly, the module is to configure readline, not to ask
for a line of text.

It's a bit confusing, but very useful.

ChrisA


More information about the Python-list mailing list