Module to read input from commandline
bskaplan14 at yahoo.com
Sun Apr 13 19:11:18 CEST 2008
Unless I misunderstand your needs, you could just use raw_input(prompt) to get your answers.
----- Original Message ----
From: "james at reggieband.com" <james at reggieband.com>
To: python-list at python.org
Sent: Sunday, April 13, 2008 11:12:06 AM
Subject: Module to read input from commandline
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
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.
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list