##// END OF EJS Templates
Merge pull request #7578 from Carreau/moreerrors...
Merge pull request #7578 from Carreau/moreerrors Catch and/or log a bit more errors.

File last commit:

r18587:1e136a8b
r20187:f8315efc merge
Show More
clearoutput.py
20 lines | 627 B | text/x-python | PythonLexer
Julia Evans
Add preprocessor that clears cell outputs
r16295 """Module containing a preprocessor that removes the outputs from code cells"""
Julia Evans
Fix copyright on clearoutput.py
r16296 # Copyright (c) IPython Development Team.
Julia Evans
Add preprocessor that clears cell outputs
r16295 # Distributed under the terms of the Modified BSD License.
from .base import Preprocessor
class ClearOutputPreprocessor(Preprocessor):
"""
Removes the output from all code cells in a notebook.
"""
def preprocess_cell(self, cell, resources, cell_index):
"""
Apply a transformation on each cell. See base.py for details.
"""
if cell.cell_type == 'code':
cell.outputs = []
MinRK
s/prompt_number/execution_count in nbformat 4
r18587 cell.execution_count = None
Julia Evans
Add preprocessor that clears cell outputs
r16295 return cell, resources