ask pypi code example
Example: ask pypi
>>> from ask import ask, askChar, askInt, askString, askPassword, askEmail, askBool, explain
>>> ask()
>>> askInt('Your age')
Your age
>>> askString("What's your name?")
What's your name?
>>> askChar('Do you want to proceed?', ['y','n'])
Do you want to proceed? (y/n)
>>> askChar('Do you want to install this?', ['y','n'], 'y')
Do you want to install this? (y/n) [y]
>>> askBool('Do you want to continue?')
Do you want to continue (y/n)
>>> askEmail()
>> askPassword()
>> explain()
Attention: Input prompts follow this template:
"Question (answer1, answer2, answer3) [default_answer]"
(You can just hit enter to chose the default answer)