readline clear buffer
Alex Martelli
aleax at aleax.it
Sat Apr 12 06:32:05 EDT 2003
luc wastiaux wrote:
> Hello,
> when using readline, I can retrieve the contents of the line buffer using
> get_line_buffer()
>
> but is there a way to clear this buffer ? none of the provided functions
> seem to allow that: http://www.python.org/doc/lib/module-readline.html
Right: it seems that Python's readline.c does not expose interfaces to
rl_delete_text, rl_kill_text, or other GNU Readline functions that would
allow such behavior. I suspect the simplest solution would be to patch
readline.c to add such interfaces (also patch the docs accordingly), and
submit the patch to sourceforge, where I think it would be welcome (and
still in time to get into Python 2.3, for a modest addition, I think).
Alex
More information about the Python-list
mailing list