Skip to content

Instantly share code, notes, and snippets.

@justincase
Created June 9, 2013 00:48
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 justincase/5737137 to your computer and use it in GitHub Desktop.
Save justincase/5737137 to your computer and use it in GitHub Desktop.
Python try/else example
# http://stackoverflow.com/questions/855759/python-try-else
try:
from EasyDialogs import AskPassword
except ImportError:
getpass = default_getpass
else:
// 20 other lines
getpass = AskPassword
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment