Providing 'default' value with raw_input()?
rupole at hotmail.com
Fri Dec 23 06:05:05 CET 2005
If you have Pywin32 build 205 installed, you can use the
win32console module to add the data to the typeahead
buffer before you call raw_input.
def raw_input_with_default(prompt, default_val):
for c in default_val:
data=raw_input_with_default('modify this: ','some data')
"planetthoughtful" <planetthoughtful at gmail.com> wrote:
> Hi Steve,
> As keir mentioned, my goal is to be able to edit the value returned
> from a record stored in SQLite, so that it can be updated with the new
> To give a little background: as a learning exercise I'm writing a
> command line app that will allow me to quickly capture todo items
> (based on a similar concept used by an app for the Mac described on
> 43folders.com). I have the functionality working for adding todo items,
> and listing items by various criteria, and updating the status of
> items, but haven't included any functionality for being able to edit
> It seems, according to kier, that this simply can't be done via the
> command line in DOS, which is a shame.
> Sorry I didn't explain myself very well in my original post.
> Much warmth,
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
More information about the Python-list