Skip to content

Instantly share code, notes, and snippets.

@redraw
Created July 13, 2016 22:53
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 redraw/d44032f6c84f9753c0d675f0921e464b to your computer and use it in GitHub Desktop.
Save redraw/d44032f6c84f9753c0d675f0921e464b to your computer and use it in GitHub Desktop.
pipe json string from stdin into ipython
function jsonloads {
python -c 'import json,sys,IPython; stdin=sys.stdin.read(); sys.stdin=open("/dev/tty"); data=json.loads(stdin); IPython.embed(header="JSON loaded in \"data\" object.")'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment