David Wahler wrote: >With the disclaimer that, as others have said, this may not be the best >user-interface choice: > > import readline > readline.set_startup_hook(lambda: readline.insert_text(old_value)) > try: > new_value = raw_input() > finally: > readline.set_startup_hook(None) > >Note that, among other issues, this isn't threadsafe (but then, you >really shouldn't be doing console I/O from multiple threads anyway). >Hope this helps. > >-- David > > > Thanks David, this was exactly what I was looking for.
Paraic. -- http://mail.python.org/mailman/listinfo/python-list