예제 #1
0
 def _clear_notebook(self, node):                # pragma: no cover
     if NotebookExporter is not None:
         exporter = NotebookExporter()
         exporter.register_preprocessor(ClearOutputPreprocessor(enabled=True))
         cleared,_ = exporter.from_notebook_node(node)
     else:
         stripped_node = v3_strip_output(node)
         cleared = current.writes(stripped_node, 'ipynb')
     return cleared
예제 #2
0
 def _clear_notebook(self, node):                # pragma: no cover
     if NotebookExporter is not None:
         exporter = NotebookExporter()
         exporter.register_preprocessor(ClearOutputPreprocessor(enabled=True))
         cleared,_ = exporter.from_notebook_node(node)
     else:
         stripped_node = v3_strip_output(node)
         cleared = current.writes(stripped_node, 'ipynb')
     return cleared