I\'m using Python 3.2 on Ubuntu 11.10 (Linux). A piece of my new code looks like this:
text = input(\"TEXT=\")
Is it possible to get some predef
If your Python interpreter is linked against GNU readline, input()
will use it. In this case, the following should work:
import readline
def input_with_prefill(prompt, text):
def hook():
readline.insert_text(text)
readline.redisplay()
readline.set_pre_input_hook(hook)
result = input(prompt)
readline.set_pre_input_hook()
return result