Created
April 22, 2014 22:25
-
-
Save ccorcos/11196516 to your computer and use it in GitHub Desktop.
Some convenient helpers for interacting via the commandline in python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def wait(msg=''): | |
print msg | |
a = raw_input("press <enter> to continue...") | |
def yesno(msg): | |
print msg | |
a = raw_input('y/n: ') | |
if a == 'y': | |
return True | |
elif a == 'n': | |
return False | |
else: | |
return yesno(msg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment