On Mon, Jun 22, 2009 at 1:19 AM, Luca<luca...@gmail.com> wrote: > On Sun, Jun 21, 2009 at 12:51 PM, Peter Otten<__pete...@web.de> wrote: >> With "traduced" you stumbled upon another false friend ;) >> >> http://it.wikipedia.org/wiki/Falso_amico > > D'oh!!! x-) > >> import readline >> >> def input_default(prompt, default): >> def startup_hook(): >> readline.insert_text(default) >> readline.set_startup_hook(startup_hook) >> try: >> return raw_input(prompt) >> finally: >> readline.set_startup_hook(None) >> >> 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 Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list