passing string for editing in input()

Aahz aahz at pythoncraft.com
Sun Feb 7 17:24:04 CET 2010


In article <mailman.1787.1265117353.28905.python-list at python.org>,
Chris Rebert  <clp2 at rebertia.com> wrote:
>On Tue, Feb 2, 2010 at 5:24 AM, mk <mrkafk at gmail.com> wrote:
>>
>> Is there an easy way to get an editing (readline) in Python that would
>> contain string for editing and would not just be empty?
>>
>> I googled but found nothing.
>
>Er...: http://docs.python.org/library/readline.html
>It's the third hit for "python readline".
>
>Actually reading the page, sounds like you want readline.insert_text()
>specifically.

That seems a tad harsh, especially after reading the docs and following
Peter Otten's link.  It's not at all obvious how to actually use
insert_text(), and although I probably could have figured it out on my
own, I might well have posted here myself.  Did you try using
insert_text() before posting?
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

import antigravity



More information about the Python-list mailing list