readline clear buffer

luc wastiaux luc at nospam.com
Fri Apr 11 23:38:40 CEST 2003


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

what I would like to do is TAB-complete a command containing more than one 
word, ie:

/msg user1 <TAB> 
inserts /msg user2

on the command line, and this cyclically given a certain list of users. 
Does anyone have an idea of how to do that?

thanks in advance for any suggestions.

-- 
luc wastiaux
 $ finger luc at info.4002.org




More information about the Python-list mailing list