Skip to content

Instantly share code, notes, and snippets.

@scottrogowski
Created March 26, 2015 15:56
Show Gist options
  • Save scottrogowski/6b3711c4f32a3d93f74c to your computer and use it in GitHub Desktop.
Save scottrogowski/6b3711c4f32a3d93f74c to your computer and use it in GitHub Desktop.
Loads the json contents of the clipboard as a python datastructure
#!/usr/bin/env python
# Loads the json contents of the clipboard as a python datastructure called jobj
import sys
import json
from IPython import embed
if __name__ == "__main__":
f_name = sys.argv[1]
with open(f_name) as f:
jobj = json.loads(f.read())
print "="*50
print "The json is loaded as 'jobj'. Have at it!"
print "="*50
embed()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment