readline clear buffer
luc wastiaux
luc at nospam.com
Sat Apr 12 09:00:09 EDT 2003
In article <FWRla.4654$T34.116245 at news2.tin.it>, Alex Martelli wrote:
> 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).
Hello,
thank you for your advice, I patched readline.c and added a delete_text
method, I will test it and if it behaves correctly I will submit the patch
to sourceforge.
--
luc wastiaux
$ finger luc at info.4002.org
More information about the Python-list
mailing list