ó
§]c           @   sR   d  Z  d d l m Z d d l Z d d l m Z m Z d e f d     YZ d S(   s   NotebookExporter classi   (   t   Exporteri˙˙˙˙N(   t   Enumt   defaultt   NotebookExporterc           B   sk   e  Z d  Z e e e j  d e j d d j d e	  Z
 e d  d    Z d Z d Z d
 d	  Z RS(   sÄ   Exports to an IPython notebook.

    This is useful when you want to use nbconvert's preprocessors to operate on
    a notebook (e.g. to execute it) and then write it back to a notebook file.
    t   default_valuet   helpsP   The nbformat version to write.
        Use this to downgrade notebooks.
        t   configt   file_extensionc         C   s   d S(   Ns   .ipynb(    (   t   self(    (    s;   lib/python2.7/site-packages/nbconvert/exporters/notebook.pyt   _file_extension_default   s    s   application/jsont   Notebookc         K   s   t  t |   j | | |  \ } } |  j | j k rJ d |  j | d <n
 d | d <t j | d |  j } | j d  s | d } n  | | f S(   Ns   .v%it   output_suffixs
   .nbconvertt   versions   
(   t   superR   t   from_notebook_nodet   nbformat_versiont   nbformatt   writest   endswith(   R   t   nbt	   resourcest   kwt   nb_copyt   output(    (    s;   lib/python2.7/site-packages/nbconvert/exporters/notebook.pyR      s    $
N(   t   __name__t
   __module__t   __doc__R   t   listR   t   versionst   current_nbformatt   tagt   TrueR   R   R	   t   output_mimetypet   export_from_notebookt   NoneR   (    (    (    s;   lib/python2.7/site-packages/nbconvert/exporters/notebook.pyR   
   s   		(   R   t   exporterR    R   t	   traitletsR   R   R   (    (    (    s;   lib/python2.7/site-packages/nbconvert/exporters/notebook.pyt   <module>   s   