##// END OF EJS Templates
Use cell.prompt_number rather than cell['prompt_number']
Jessica B. Hamrick -
Show More
@@ -1,28 +1,28 b''
1 1 """Module containing a preprocessor that removes the outputs from code cells"""
2 2
3 3 # Copyright (c) IPython Development Team.
4 4 # Distributed under the terms of the Modified BSD License.
5 5
6 6 #-----------------------------------------------------------------------------
7 7 # Imports
8 8 #-----------------------------------------------------------------------------
9 9
10 10 from .base import Preprocessor
11 11
12 12
13 13 #-----------------------------------------------------------------------------
14 14 # Classes
15 15 #-----------------------------------------------------------------------------
16 16 class ClearOutputPreprocessor(Preprocessor):
17 17 """
18 18 Removes the output from all code cells in a notebook.
19 19 """
20 20
21 21 def preprocess_cell(self, cell, resources, cell_index):
22 22 """
23 23 Apply a transformation on each cell. See base.py for details.
24 24 """
25 25 if cell.cell_type == 'code':
26 26 cell.outputs = []
27 cell['prompt_number'] = None
27 cell.prompt_number = None
28 28 return cell, resources
General Comments 0
You need to be logged in to leave comments. Login now