[IPython-dev] Hacking nbconvert, nbformat: Looking for howto's

Thomas Kluyver takowl at gmail.com
Thu Mar 5 12:56:25 EST 2015


On 5 March 2015 at 01:26, Mark Andrews <mjandrews.net at gmail.com> wrote:

> However, it looks like some of its code is now out of date. For example, I
> get warnings about deprecated code.


At a glance, the main changes are:

nbformat.current is deprecated - it was an API that would always refer to
the latest version of nbformat, but we decided that wasn't so useful. Now
use:

from IPython import nbformat

Then you'll need to specify the in-memory format you're expecting when you
load a notebook:

nb = nbformat.reads(response.text, as_version=4)

If you load the notebook as version 4, then we got rid of the notion of
worksheets, so you can take out any references to '.worksheets[0]'.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150305/444068ad/attachment.html>


More information about the IPython-dev mailing list