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
-
__dict__
= mappingproxy({'__init__': <function Cell.__init__>, '__weakref__': <attribute '__weakref__' of 'Cell' objects>, '__module__': 'PyFoam.IPythonHelpers.Notebook', 'isClass': <function Cell.isClass>, '__dict__': <attribute '__dict__' of 'Cell' objects>, 'meta': <function Cell.meta>, '__doc__': 'Wrapper for the dictionaries that represent notebook cells.\n Mostly for conveniently querying metadata'})¶
-
__module__
= 'PyFoam.IPythonHelpers.Notebook'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
-
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
-
_Notebook__addCell
(**kwargs)¶
-
__dict__
= mappingproxy({'_Notebook__addCell': <function Notebook.__addCell>, '__module__': 'PyFoam.IPythonHelpers.Notebook', 'name': <property object>, '__init__': <function Notebook.__init__>, 'addRaw': <function Notebook.addRaw>, '__doc__': 'Class that represents an IPython-notebook in memory', '__dict__': <attribute '__dict__' of 'Notebook' objects>, '__weakref__': <attribute '__weakref__' of 'Notebook' objects>, 'addHeading': <function Notebook.addHeading>, 'addCode': <function Notebook.addCode>, 'pyFoamMetaData': <function Notebook.pyFoamMetaData>, 'reset': <function Notebook.reset>, '_cells': <function Notebook._cells>, 'raw': <property object>, '__iter__': <function Notebook.__iter__>, 'addMarkdown': <function Notebook.addMarkdown>, '__len__': <function Notebook.__len__>, 'writeToFile': <function Notebook.writeToFile>})¶
-
__init__
(input=None, nbformat=3, nbformat_minor=0, name=None)[source]¶ Parameters: input – If this is a string then it is interpreted as a filename. Otherwise as a filehandle. If unset then an empty notebook is contructed :param name: name of the notebook. Only used if a new notebook is created
-
__module__
= 'PyFoam.IPythonHelpers.Notebook'¶
-
__weakref__
¶ list of weak references to the object (if defined)
-
name
¶
-
raw
¶
-