environment/lib/python2.7/site-packages/IPython/frontend/html/notebook/notebookmanager.py
def get_notebook(self, notebook_id, format=u'json'):
        """Get the representation of a notebook in format by notebook_id."""
        format = unicode(format)
        if format not in self.allowed_formats:
            raise web.HTTPError(415, u'Invalid notebook format: %s' % format)
        last_modified, nb = self.get_notebook_object(notebook_id)
        kwargs = {}
        if format == 'json':
            # don't split lines for sending over the wire, because it
            # should match the Python in-memory format.
            kwargs['split_lines'] = False
        data = current.writes(nb, format, **kwargs)
        name = nb.metadata.get('name','notebook')
        return last_modified, name, data
def get_notebook(self, notebook_id, format=u'json'):
        format = unicode(format)
        if format not in self.allowed_formats:
            raise web.HTTPError(415, u'Invalid notebook format: %s' % format)
        last_modified, nb = self.get_notebook_object(notebook_id)
        kwargs = {}
        if format == 'json':
            # don't split lines for sending over the wire, because it
            # should match the Python in-memory format.
            kwargs['split_lines'] = False
        data = current.writes(nb, format, **kwargs)
        name = nb.metadata.get('name','notebook')
        return last_modified, name, data
def get_notebook ( self , notebook_id , format = u'json' ) : format = unicode ( format ) if format not in self . allowed_formats : raise web . HTTPError ( 415 , u'Invalid notebook format: %s' % format ) last_modified , nb = self . get_notebook_object ( notebook_id ) kwargs = { } if format == 'json' : # don't split lines for sending over the wire, because it # should match the Python in-memory format. kwargs [ 'split_lines' ] = False data = current . writes ( nb , format , * * kwargs ) name = nb . metadata . get ( 'name' , 'notebook' ) return last_modified , name , data
Get the representation of a notebook in format by notebook_id.
Get the representation of a notebook in format by notebook_id .