
    Eh                        S r SSKJr  SSKrSSKrSSKJrJr  SSKJ	r	J
r
  SSKJrJrJr  SSKJrJrJr  SSKJr  SS	KJr  S
r\" \5      r\R5                  \5        \R5                  \
" SSSS5      5        \" \5      r\R5                  \5        \" \R:                  " 5       5      r\" \R:                  " 5       5      r " S S\\5      r \ RB                  =r"r#\$S:X  a  \"" 5         gg)zA minimal application using the ZMQ-based terminal IPython frontend.

This is not a complete console app, as subprocess will not be able to receive
input, there is no real readline support, among other limitations.
    )print_functionN)DictAny)catch_config_errorboolean_flag)
JupyterAppbase_aliases
base_flags)JupyterConsoleAppapp_aliases	app_flags)ZMQTerminalInteractiveShell)__version__zs
jupyter console # start the ZMQ-based console
jupyter console --existing # connect to an existing ipython session
zsimple-promptz)ZMQTerminalInteractiveShell.simple_promptz-Force simple minimal prompt using `raw_input`z1Use a rich interactive prompt with prompt_toolkitc                      ^  \ rS rSrSr\r Sr\r	\
/\R                  -   r\" \5      r\" \5      r\" \5      r\" \5      r\" 5       rSrSU 4S jjrS rS rS r\SU 4S	 jj5       rS
 rU 4S jrSrU =r$ )ZMQTerminalIPythonAppB   zjupyter-consolea  
        The Jupyter terminal-based Console.

        This launches a Console application inside a terminal.

        The Console supports various extra features beyond the traditional
        single-process Terminal IPython shell, such as connecting to an
        existing ipython session, via:

            jupyter console --existing

        where the previous session could have been created by another ipython
        console, an ipython qtconsole, or by opening an ipython notebook.

    Tc                 b   > [         [        U ]  U5        U R                  U R                  5        g N)superr   parse_command_linebuild_kernel_argv
extra_argsselfargv	__class__s     fC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\jupyter_console/app.pyr   (ZMQTerminalIPythonApp.parse_command_lineb   s%    #T=dCt/    c                 B   [         R                  " U 5        [        R                  " [        R                  U R                  5        [
        R                  " U U R                  U R                  U R                  S9U l
        U R                  (       + U R                  l        g )N)parentmanagerclientconfirm_exit)r   
initializesignalSIGINThandle_sigintr   instancekernel_managerkernel_clientr$   shellexisting
own_kernelr   s    r   
init_shell ZMQTerminalIPythonApp.init_shellf   sl    $$T*fmmT%7%78099 $ 3 3#11%)%6%6


 %)MM 1

r   c                     g r    r/   s    r   init_gui_pylab$ZMQTerminalIPythonApp.init_gui_pylabq   s    r   c                     U R                   R                  (       aE  U R                  (       a  U R                  R                  5         g [	        S[
        R                  S9  g [        e)Nz0ERROR: Cannot interrupt kernels we didn't start.)file)r,   
_executingr*   interrupt_kernelprintsysstderrKeyboardInterrupt)r   argss     r   r(   #ZMQTerminalIPythonApp.handle_sigintu   sD    ::  ""##446H ZZ)
 $#r   c                    > [         [        U ]  U5        U R                  (       a  gU R	                  5         U R                  5         g)z8Do actions after construct, but before starting the app.N)r   r   r%   _dispatchingr0   init_bannerr   s     r   r%    ZMQTerminalIPythonApp.initialize   s7     	#T5d;r   c                 8    U R                   R                  5         g)zoptionally display the bannerN)r,   show_bannerr/   s    r   rB   !ZMQTerminalIPythonApp.init_banner   s    

 r   c                    > [         [        U ]  5         U R                  R	                  S5        U R
                  R                  5         g )Nz(Starting the jupyter console mainloop...)r   r   startlogdebugr,   mainloop)r   r   s    r   rH   ZMQTerminalIPythonApp.start   s2    #T02AB

r   )r,   r   )__name__
__module____qualname____firstlineno__namer   versiondescription	_examplesexamplesr   r   classesr   flagsaliasesr   frontend_aliasesfrontend_flagssubcommandsforce_interactr   r0   r4   r(   r   r%   rB   rH   __static_attributes____classcell__)r   s   @r   r   r   B   s    DG>K H*+.?.G.GGGKE7mG+,(N&KN0	2
$  ! r   r   __main__)%__doc__
__future__r   r&   r;   	traitletsr   r   traitlets.configr   r   jupyter_core.applicationr   r	   r
   jupyter_client.consoleappr   r   r   jupyter_console.ptshellr   jupyter_consoler   rT   dictrW   updaterX   setkeysrY   rZ   r   launch_instancemainlaunch_new_instancerM   r3   r   r   <module>ro      s    &  
 > I I  @ '	 	Z Y  \@37  |
 { {'')* Y^^%&RJ(9 Rj 3BB B zF r   