raw_input with a pre-compiled data
clp2 at rebertia.com
Mon Jun 22 10:36:05 CEST 2009
On Mon, Jun 22, 2009 at 1:19 AM, Luca<lucafbb at gmail.com> wrote:
> On Sun, Jun 21, 2009 at 12:51 PM, Peter Otten<__peter__ at web.de> wrote:
>> With "traduced" you stumbled upon another false friend ;)
> D'oh!!! x-)
>> import readline
>> def input_default(prompt, default):
>> def startup_hook():
>> return raw_input(prompt)
>> print input_default("directory? ", default="/home/john")
> Thanks! It works! This is working on Linux and MacOS too.
>> The readline module is specific to Unix implementations.
>> I don't know what OS the OP was using.
> Any one knows is this working also on Windows? I've no Win system
> right no to test this...
No, it won't. "specific to Unix" == Unix-only
More information about the Python-list