Created
January 26, 2013 09:05
-
-
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
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 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