Baffled by readline module
Simon Ward
simon+python at bleah.co.uk
Fri Mar 10 12:23:22 EST 2023
On Fri, Mar 10, 2023 at 06:37:56AM -0800, Grant Edwards wrote:
>On 2023-03-10, Weatherby,Gerard <gweatherby at uchc.edu> wrote:
>I'll have to remember that one. It doesn't really fit my current use
>case, but there are others where it would work nicely.
>
>However, cmd.Cmd does not provide command recall and
>editing. According to the page above, that's provided by the readline
>module
There is also prompt_toolkit[1] for even more fancy command‐line
handling. The documentation even states it “can be a very advanced pure
Python replacement for GNU readline, but it can also be used for
building full screen applications.” (It doesn’t depend on readline or
libedit.) It’s used by IPython for its history, editing, and completion
features. If cmd with readline is overkill for your use case then this
is even more so, but I thought it worth a mention.
Simon
More information about the Python-list
mailing list