Skip to content

Instantly share code, notes, and snippets.

@mekarpeles
Created January 26, 2013 09:05
Show Gist options
  • Save mekarpeles/4641215 to your computer and use it in GitHub Desktop.
Save mekarpeles/4641215 to your computer and use it in GitHub Desktop.
Auxiliary json file open and loading function -- /usr/lib/python2.7/json/__init__.py
def slurps(f, perms='r'):
"""Auxiliary json file open and loading function"""
try:
with open(f, perms) as fp:
return loads(fp.read())
except:
raise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment