Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def read_notebook(path):
"""
Returns a Notebook object loaded from the location specified at `path`.
Parameters
----------
path : str
Path to a notebook `.ipynb` file.
Returns
-------
notebook : object
A Notebook object.
"""
return Notebook(path)
def __setitem__(self, key, value):
# If notebook is a path str then load the notebook.
if isinstance(value, string_types):
value = Notebook(value)
self._notebooks.__setitem__(key, value)
def copy(self):
cp = Notebook(self.node.copy())
cp.path = self.path
return cp