Skip to content

Instantly share code, notes, and snippets.

@Kwpolska
Created February 24, 2014 18:29
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 Kwpolska/9194001 to your computer and use it in GitHub Desktop.
Save Kwpolska/9194001 to your computer and use it in GitHub Desktop.
try:
with open('filename') as fh:
contents = fh.read()
except IOError as e:
print('stuff went wrong')
print(e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment