Module to read input from commandline

james at reggieband.com james at reggieband.com
Sun Apr 13 11:12:06 EDT 2008


Hi all,

I did some quick searching but I haven't found anything like I want.
It probably has to do with the terms I am searching for so if I
describe what I want then I hope someone can point me to a good
module.

I want to take input from the user at the command line. e.g.)
Would you like to continue [Y/n]: y
What is your favorite color: green
....

You get the idea.  Basic question answer stuff.  It should handle
default options, case insensitivity, etc.  Perhaps the module would
compare the inputted text against a regexp for validation.  If the
module had an interface similar to OptParse that would be nice.

Anyone know of a decent module that handles this type of thing?
Writing from scratch would be simple but why re-invent the wheel.

Cheers,
James.



More information about the Python-list mailing list