ó
§‰]c           @   s@   d  Z  d d l m Z d d l m Z d e f d „  ƒ  YZ d S(   sI   Module containing a preprocessor that removes the outputs from code cellsiÿÿÿÿ(   t   Seti   (   t   Preprocessort   ClearOutputPreprocessorc           B   s5   e  Z d  Z e d d h ƒ j d e ƒ Z d „  Z RS(   s?   
    Removes the output from all code cells in a notebook.
    t	   collapsedt   scrolledt   configc         C   sd   | j  d k rZ g  | _ d | _ d | k rZ x' |  j D] } | j j | d ƒ q7 WqZ n  | | f S(   sO   
        Apply a transformation on each cell. See base.py for details.
        t   codet   metadataN(   t	   cell_typet   outputst   Nonet   execution_countt   remove_metadata_fieldsR   t   pop(   t   selft   cellt	   resourcest
   cell_indext   field(    (    sB   lib/python2.7/site-packages/nbconvert/preprocessors/clearoutput.pyt   preprocess_cell   s    		(   t   __name__t
   __module__t   __doc__R    t   tagt   TrueR   R   (    (    (    sB   lib/python2.7/site-packages/nbconvert/preprocessors/clearoutput.pyR   	   s
   	N(   R   t	   traitletsR    t   baseR   R   (    (    (    sB   lib/python2.7/site-packages/nbconvert/preprocessors/clearoutput.pyt   <module>   s   