Module to read input from commandline
Ben Kaplan
bskaplan14 at yahoo.com
Sun Apr 13 13:11:18 EDT 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
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.
--
http://mail.python.org/mailman/listinfo/python-list
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080413/18f9d491/attachment-0001.html>
More information about the Python-list
mailing list