PyFoam.IPythonHelpers.Notebook module

Read and create IPython-Notebooks

class PyFoam.IPythonHelpers.Notebook.Cell(classes=(), pyFoam={}, **kwargs)[source]

Bases: dict

Wrapper for the dictionaries that represent notebook cells. Mostly for conveniently querying metadata

isClass(name)[source]

Checks whether a cell is of a specific class. If a string is passed the string is checked. Otherwise it is assumed that it is a container and the

meta()[source]
class PyFoam.IPythonHelpers.Notebook.Notebook(input=None, nbformat=3, nbformat_minor=0, name=None)[source]

Bases: object

Class that represents an IPython-notebook in memory

addCode(input, collapsed=False, language='python', **kwargs)[source]
addHeading(title, level=1, **kwargs)[source]
addMarkdown(text, **kwargs)[source]
addRaw(text, **kwargs)[source]
name
pyFoamMetaData()[source]

Our very own metadata-dictionary

raw
reset(new)[source]
writeToFile(fName)[source]