
    Eh}                       % S r SSKJr  SSKrSSKrSSKrSSKJr  SSKJ	r	  SSK
r
SSKJr  SSKJrJrJrJrJr  SSKJr  SS	KJr  S
SKJr  SSSSS.rS\S'   SSS00S4SSS00S4S.rS\S'    " S S\5      r\R:                  rg)znbclient cli.    )annotationsN)Path)dedent)
JupyterApp)BoolIntegerListUnicodedefault)catch_config_error)__version__   )NotebookClientzNbClientApp.timeoutzNbClientApp.startup_timeoutzNbClientApp.kernel_namezNbClientApp.output_base)timeoutstartup_timeoutkernel_nameoutputzdict[str, str]nbclient_aliasesNbClientAppallow_errorsTzLErrors are ignored and execution is continued until the end of the notebook.inplacez/Overwrite input notebook with executed results.)zallow-errorsr   zdict[str, typing.Any]nbclient_flagsc                  4  ^  \ rS rSrSr\" \5      rSr\	r
\rSr\" \" 5       SS9R                  SS9r\" S	S\" S
5      S9R                  SS9r\" S\" S5      S9R                  SS9r\" S\" S5      S9R                  SS9r\" S\" S5      S9R                  SS9r\" S\" S5      S9R                  SS9r\" S\" S5      S9R                  SS9r\" S	S\" S5      S9R                  SS9r\" S5      SS j5       r\SSU 4S jjj5       rSS jrS S jr Sr!U =r"$ )!r   0   z=
An application used to execute notebook files (``*.ipynb``)
zjupyter-executez7An application used to execute notebook files (*.ipynb)zPath of notebooks to convert)helpT)configNz
            The time to wait (in seconds) for output from executions.
            If a cell execution takes longer, a TimeoutError is raised.
            ``-1`` will disable the timeout.
            )
allow_noner   <   z
            The time to wait (in seconds) for the kernel to start.
            If kernel startup takes longer, a RuntimeError is
            raised.
            FaB  
            When a cell raises an error the default behavior is that
            execution is stopped and a :py:class:`nbclient.exceptions.CellExecutionError`
            is raised.
            If this flag is provided, errors are ignored and execution
            is continued until the end of the notebook.
            zskip-executionz^
            Name of the cell tag to use to denote a cell that should be skipped.
             z
            Name of kernel to use to execute the cells.
            If not set, use the kernel_spec embedded in the notebook.
            z
            Default is execute notebook without writing the newly executed notebook.
            If this flag is provided, the newly generated notebook will
            overwrite the input notebook.
            a8  
            Write executed notebook to this file base name.
            Supports pattern replacements ``'{notebook_name}'``,
            the name of the input notebook file without extension.
            Note that output is always relative to the parent directory of the
            input notebook.
            	log_levelc                "    [         R                  $ N)loggingINFO)selfs    _C:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\nbclient/cli.py_log_level_defaultNbClientApp._log_level_default   s    ||    c                j  > [         TU ]  U5        U R                  5       U l        U R                  (       d  [        R
                  " S5        [        U R                  5      S:  a*  U R                  b  SU R                  ;  a  Sn[        U5      eU R                   H  nU R                  U5        M     g)zInitialize the app.r   Nz{notebook_name}zgIf passing multiple notebooks with `--output=output` option, output string must contain {notebook_name})
super
initializeget_notebooks	notebookssysexitlenoutput_base
ValueErrorrun_notebook)r%   argvmsgpath	__class__s       r&   r-   NbClientApp.initialize   s     	4  ++- ~~HHRL t~~"t'7'7'C (8(88A  !o% NNDd# #r)   c                \    U R                   (       a  U R                   nU$ U R                  nU$ )zGet the notebooks for the app.)
extra_argsr/   )r%   r/   s     r&   r.   NbClientApp.get_notebooks   s/     ??I  I r)   c                   U R                   R                  SU 35        [        U5      R                  S5      nUR                  R                  5       nU R                  (       a  UnOnU R                  (       a[  UR                  R                  U R                  R                  UR                  S5      R                  S95      R                  S5      nOSnU(       a:  UR                  R                  5       (       d  SUR                   S3n[        U5      eUR                  5        n[        R                  " USS	9nSSS5        [!        WU R"                  U R$                  U R&                  U R(                  U R*                  S
SU00S9nUR-                  5         U(       a5  U R                   R                  SU 35        [        R.                  " Xt5        gg! , (       d  f       N= f)zRun a notebook by path.z
Executing z.ipynbr   )notebook_nameNzCannot write to directory=z that does not exist   )
as_versionmetadatar8   )r   r   skip_cells_with_tagr   r   	resourceszSave executed results to )loginfor   with_suffixparentabsoluter   r3   joinpathformatnameis_dirr4   opennbformatreadr   r   r   rC   r   r   executewrite)	r%   notebook_path
input_pathr8   output_pathr7   fnbclients	            r&   r5   NbClientApp.run_notebook   s    	
=/23-(44X>
   ))+ <<$K$++44  ''j6L6LR6P6U6U'Vk(#  K{1188::.{/A/A.BBVWCS/! __!qQ/B   LL 00 $ 8 8**((!FD>2
 	 HHMM5k]CDNN2+ % s   &G
G$)r/   )returnintr"   )r6   zlist[str] | NonerZ   None)rZ   z	list[str])rS   strrZ   r\   )#__name__
__module____qualname____firstlineno____doc__r
   r   versionrL   r   aliasesr   flagsdescriptionr	   tagr/   r   r   r   r   r   r   rC   r   r   r3   r   r'   r   r-   r.   r5   __static_attributes____classcell__)r9   s   @r&   r   r   0   s    k"GDGEKKWY%CDHHPTHUI

 
cc  

	 
cc  
 
cc  "
 
cc  

 
cc  
	 
cc  
 
cc  [  $ $ $0
-, -,r)   )rb   
__future__r   r#   r0   typingpathlibr   textwrapr   rO   jupyter_core.applicationr   	traitletsr   r   r	   r
   r   traitlets.configr   nbclientr   rX   r   r   __annotations__r   r   launch_instancemain r)   r&   <module>rv      s     "  
     / ; ; /   "
 %4,'	$ .  	

 	W 4	

 	:)% (l,* l,^ ""r)   