
    Ch&                         S r SSKrSSKrSSKrSSKrSSKJr  \R                  " S5      r " S S\R                  R                  \R                  R                  5      r
g)zBase class to manage comms    N   )Commzipykernel.commc                       \ rS rSrSr\R                  " S5      r\R                  " 5       r	\R                  " 5       r
S rS rSrg)CommManager   zA comm manager.zipykernel.kernelbase.Kernelc                     [         R                  R                  R                  U 5        [        R
                  R                  R                  " U 40 UD6  g)zInitialize the manager.N)comm	base_commr   __init__	traitletsconfigLoggingConfigurable)selfkwargss     iC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\ipykernel/comm/manager.pyr   CommManager.__init__   s;     	""++D1,,55dEfE    c                    US   nUS   nUS   nU R                   R                  US5      n[        USUSS9nU R                  U5        Uc  [        R                  SU5        O
 U" X5        g UR                  " 5         g! [         a    [        R                  SUS	S
9   N4f = f! [         a    [        R                  SS	S
9   gf = f)zHandler for comm_open messagescontentcomm_idtarget_nameNF)r   primaryr   show_warningz"No such comm target registered: %sz&Exception opening comm with target: %sT)exc_infozqCould not close comm during `comm_open` failure
                clean-up.  The comm may not have been opened yet.)targetsgetr   register_commloggererror	Exceptionclose)	r   streamidentmsgr   r   r   fr	   s	            r   	comm_openCommManager.comm_open   s     i.)$m,LL[$/#	
 	4 9LL={Kc$
	JJL  cE{]abc  	LLE  	s$   $B  .B%  B"!B"%CC N)__name__
__module____qualname____firstlineno____doc__r   InstancekernelDictcommsr   r   r&   __static_attributes__r(   r   r   r   r      s9     =>FNNEnnGF r   r   )r-   loggingcomm.base_commr	   r   traitlets.configr   	getLoggerr   r
   r   r   r   r(   r   r   <module>r7      sN     
     			+	,-$..,,i.>.>.R.R -r   