[IPython-dev] sample code using ipython api to get a notebook and edit it
Robert Alexander
roalexan at microsoft.com
Fri Nov 14 13:37:24 EST 2014
Hi. I can create an IPython notebook using the IPython API. For example:
import sys
from IPython.nbformat import current as nbf
nb = nbf.new_notebook()
with open('test.ipynb', 'w') as f:
nbf.write(nb, f, 'ipynb')
Does somebody have some sample usage of the IPython API to get and edit a notebook, like adding/deleting cells to/from it? So far, I've been trying to use the documentation at: http://ipython.org/ipython-doc/2/api/generated/IPython.nbformat.v3.nbbase.html, but I'm having a hard time getting it to work.
Thanks, Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141114/d9f087ea/attachment.html>
More information about the IPython-dev
mailing list