IPython Documentation

Table Of Contents

Previous topic

Module: nbformat.v2.rwbase

Next topic

Module: nbformat.v3.convert

This Page

Note

This documentation is for a development version of IPython. There may be significant differences from the latest stable release (1.2.1).

Module: nbformat.v3

The main API for the v3 notebook format.

Authors:

  • Brian Granger

1 Function

IPython.nbformat.v3.parse_filename(fname)

Parse a notebook filename.

This function takes a notebook filename and returns the notebook format (json/py) and the notebook name. This logic can be summarized as follows:

  • notebook.ipynb -> (notebook.ipynb, notebook, json)
  • notebook.json -> (notebook.json, notebook, json)
  • notebook.py -> (notebook.py, notebook, py)
  • notebook -> (notebook.ipynb, notebook, json)
Parameters:

fname : unicode

The notebook filename. The filename can use a specific filename extention (.ipynb, .json, .py) or none, in which case .ipynb will be assumed.

Returns:

(fname, name, format) : (unicode, unicode, unicode)

The filename, notebook name and format.