Providing 'default' value with raw_input()?
kent at kentsjohnson.com
Thu Dec 22 22:48:02 CET 2005
> I think that would be a great solution if the value being 'edited' was
> relatively short, or numeric, etc. But the values I want to 'edit' can
> be several hundred characters long (ie they're text fields containing
> todo notes), and using your method, I'd either accept the existing
> value, or have to retype the text for that record. I think I mislead
> people when I used the word 'default' -- I meant in the sense of being
> able to edit the existing value, so that value, out of each record,
> would be presented as the 'default', available for editing.
For fields that long I think a GUI is more appropriate than trying to use command-line
editing. You might take a look at easygui - it's textbox is readonly but it looks like it
wouldn't be hard to make it editable - or learn enough Tkinter to do it yourself.
More information about the Python-list