Created
August 8, 2013 03:58
-
-
Save jdfreder/6181325 to your computer and use it in GitHub Desktop.
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
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"print(\"this\\nwill%\\nruin everything!\")" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"this\n", | |
"will%\n", | |
"ruin everything!\n" | |
] | |
} | |
], | |
"prompt_number": 1 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"from IPython.nbformat import current\n", | |
"with open('Untitled0.ipynb') as f:\n", | |
" nb = current.read(f,'json')\n", | |
"nb.worksheets[0].cells[0]" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 2, | |
"text": [ | |
"{u'cell_type': u'code',\n", | |
" u'collapsed': False,\n", | |
" u'input': u'print(\"this\\\\nwill%\\\\nruin everything!\")',\n", | |
" u'language': u'python',\n", | |
" u'metadata': {},\n", | |
" u'outputs': [{u'output_type': u'stream',\n", | |
" u'stream': u'stdout',\n", | |
" u'text': u'this\\nwill%\\nruin everything!\\n'}],\n", | |
" u'prompt_number': 1}" | |
] | |
} | |
], | |
"prompt_number": 2 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [] | |
} | |
], | |
"metadata": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment