
    f                     R    d dl Z d dlZdddZg dZi Zd Z G d de      Zd	 Zd
 Z	y)    Nqtgtk)qt4gtk2)r   qt5qt6r   r   gtk3gtk4tkwxpygletglutosxasyncioc                     |t         | <   y)z?Register the function *inputhook* as an event loop integration.N)
registered)name	inputhooks     b/var/www/cvtools/html/venv/lib/python3.12/site-packages/IPython/terminal/pt_inputhooks/__init__.pyregisterr      s     Jt    c                       e Zd Zd Zd Zy)UnknownBackendc                     || _         y )N)r   )selfr   s     r   __init__zUnknownBackend.__init__!   s	    	r   c           	          dj                  | j                  dj                  t        t	        t
              z               S )NzANo event loop integration for {!r}. Supported event loops are: {}z, )formatr   joinbackendssortedr   )r   s    r   __str__zUnknownBackend.__str__$   s4    017		$(IIh
9K.K$L2N	Nr   N)__name__
__module____qualname__r   r"    r   r   r   r       s    Nr   r   c                 v   t         j                  j                  dd      }ddlm}m}m}m}m}m	}m
}m}	  |	       }
|d|d|d|d|d|d|di}|
$| dk7  r||
   | k7  rt        d	||
    d
       ||
   S |%| dk7  r ||   | k7  rt        d|  d| d       ||   S y| dk(  r	 ddl}dt         j                  d<   ne| dk(  r	 ddl}dt         j                  d<   nG| dk(  r2dt         j                  j%                         v r"t         j                  d= nt        d|  d       yddlm} ||   S # t        $ r> 	 ddl}dt         j                  d<   n"# t        $ r dt         j                  d<   Y nw xY wY Qw xY w# t        $ r> 	 ddl}dt         j                  d<   n"# t        $ r dt         j                  d<   Y nw xY wY w xY w)z?Sets the `QT_API` environment variable if it isn't already set.QT_APINr   )QT_API_PYQTQT_API_PYQT5QT_API_PYQT6QT_API_PYSIDEQT_API_PYSIDE2QT_API_PYSIDE6QT_API_PYQTv1
loaded_apir   r   r   r   z5Cannot switch Qt versions for this session; will use .zRequest for "zC" will be ignored because `QT_API` environment variable is set to ""pyqt5pyside2pyqt6pyside6zUnrecognized Qt version: z". Should be "qt5", "qt6", or "qt".)r(   )osenvirongetIPython.external.qt_loadersr)   r*   r+   r,   r-   r.   r/   r0   printPyQt5ImportErrorPySide2PyQt6PySide6keysIPython.external.qt_for_kernelr(   )guiqt_apir)   r*   r+   r,   r-   r.   r/   r0   loaded
qt_env2guir<   r>   r?   r@   r(   s                    r   
set_qt_apirG   *   s    ZZ^^Hd+F	 	 	 \F 	uuUeeJ cTkf$G
SYHZG[[\] f%%cTkf$u %339(!= f%% % %<
3'.

8$ E\
3'.

8$ D[2::??,,JJx(-cU2TUV 	:&!!=  33"+4BJJx(" 3+2BJJx(33  33"+4BJJx(" 3+2BJJx(33sl   D' =E1 '	E.1E	E.	E(%E.'E((E.-E.1	F8;FF8F2/F81F22F87F8c                    | t         v r| t         |    fS | t        vrt        |       | t        v rt	        t        |          S | }| j                  d      rt        |       } d}t        j                  d|z         }| |j                  fS )Nr   zIPython.terminal.pt_inputhooks.)
r   r    r   aliasesget_inputhook_name_and_func
startswithrG   	importlibimport_moduler   )rC   gui_modmods      r   rJ   rJ   z   s    
jJsO##
(S!!
g~*73<88G
~~do

!
!"Cg"M
NCr   )
rL   r7   rI   r    r   r   KeyErrorr   rG   rJ   r&   r   r   <module>rQ      sG     	 
  
!
NX NM"`r   