Starting value with raw_input

David Hirschfield davidh at ilm.com
Tue Apr 18 19:59:15 EDT 2006


Does the raw_input built-in function allow giving an initial value that 
the user can edit?
Perhaps by using the readline module?

I want to do something so that I can provide the user a default value 
they can edit as they wish at the prompt:

result = raw_input("Enter value: ")
#### Somehow output default value so prompt looks like:

Enter value: default

they can edit "default" to whatever they want, and I'll get the result.

Does what I'm asking make sense?
-Dave

-- 
Presenting:
mediocre nebula.




More information about the Python-list mailing list