bundles / nbformat latest / nbformat / write
function
nbformat:write
source: /nbformat/__init__.py:177
Signature
def write(nb, fp, version = nbformat.NO_CONVERT, capture_validation_error = None, **kwargs)Summary
Write a notebook to a file in a given nbformat version.
Extended Summary
The file-like object must accept unicode input.
Parameters
nb: NotebookNodeThe notebook to write.
fp: file or strAny file-like object with a write method that accepts unicode, or a path to write a file.
version: int, optionalThe nbformat version to write. If nb is not this version, it will be converted. If unspecified, or specified as nbformat.NO_CONVERT, the notebook's own version will be used and no conversion performed.
capture_validation_error: dict, optionalIf provided, a key of "ValidationError" with a value of the ValidationError instance will be added to the dictionary.
Aliases
nbformat.write