Skip to content

Instantly share code, notes, and snippets.

@ccorcos
Created April 22, 2014 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ccorcos/11196516 to your computer and use it in GitHub Desktop.
Save ccorcos/11196516 to your computer and use it in GitHub Desktop.
Some convenient helpers for interacting via the commandline in python
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