ó
    Ñ]jI  ã                   ód   • S r SSKrSSKrSSKrSSKJr  / SQrSS jrS r " S S	5      r	S
 r
S rg)a–  Hooks for IPython.

In Python, it is possible to overwrite any method of any object if you really
want to.  But IPython exposes a few 'hooks', methods which are *designed* to
be overwritten by users for customization purposes.  This module defines the
default versions of all such hooks, which get used by IPython if not
overridden by the user.

Hooks are simple functions, but they should be declared with ``self`` as their
first argument, because when activated they are registered into IPython as
instance methods. The self argument will be the IPython running instance
itself, so hooks have full access to the entire IPython object.

If you wish to define a new hook and activate it, you can make an :doc:`extension
</config/extensions/index>` or a :ref:`startup script <startup_files>`. For
example, you could use a startup file like this::

    import os

    def calljed(self,filename, linenum):
        "My editor hook calls the jed editor directly."
        print("Calling my own editor, jed ...")
        if os.system('jed +%d %s' % (linenum,filename)) != 0:
            raise TryNext()

    def load_ipython_extension(ip):
        ip.set_hook('editor', calljed)

é    Né   ©ÚTryNext)ÚeditorÚsynchronize_with_editorÚshow_in_pagerÚclipboard_getc                 óL  • U R                   nUb  US:X  a  SnOS[        U5      -  nSU;   a2  [        R                  R	                  U5      (       a  US   S:w  a  SU-  n[
        R                  " U< SU< SU< 3S	S
9nU(       a  UR                  5       S:w  a
  [        5       egg)a   Open the default editor at the given filename and linenumber.

This is IPython's default editor hook, you can use it as an example to
write your own modified one.  To set your own editor function as the
new editor hook, call ip.set_hook('editor',yourfunc).NÚnotepadÚ z+%dÚ r   Ú"z"%s"T)Úshell)	r   ÚintÚosÚpathÚisfileÚ
subprocessÚPopenÚwaitr   )ÚselfÚfilenameÚlinenumr   r   ÚlinemarkÚprocs          ÚO/home/mande/repo/quber/.venv/lib/python3.13/site-packages/IPython/core/hooks.pyr   r   6   s™   € ð �[‰[€Fð �˜& )Ó+Ø‰àœ3˜w›<Ñ'ˆð ˆfƒ}œŸ™Ÿ™¨×/Ñ/°F¸1±IÀÓ4DØ˜&‘ˆô ×Ò«&³(ºHÐEØ"&ñ(€Dæ�—	‘	“˜qÓ Ü‹iˆð !€tó    c                 ó   • g ©N© )r   r   r   Úcolumns       r   r   r   R   s   € Ør   c                   ó>   • \ rS rSrSrS
S jrS rS rSS jrS r	S	r
g)ÚCommandChainDispatcheréV   z¾Dispatch calls to a chain of commands until some func can handle it

Usage: instantiate, execute "add" to add commands (with optional
priority), execute normally via f() calling mechanism.

Nc                 ó&   • Uc  / U l         g Xl         g r   ©Úchain)r   Úcommandss     r   Ú__init__ÚCommandChainDispatcher.__init__]   s   € ØÑØˆD�Jà!�Jr   c                 óŠ   • [        5       nU R                   H  u  pE U" U0 UD6s  $    Ue! [          a  nUn SnAM&  SnAff = f)zÂCommand chain is called just like normal func.

This will call all funcs in chain with the same args as were given to
this function, and return the result of first func that didn't raise
TryNextN)r   r'   )r   ÚargsÚkwÚlast_excÚprioÚcmdÚexcs          r   Ú__call__ÚCommandChainDispatcher.__call__d   sN   € ô “9ˆØŸ
œ
‰HˆDðÙ˜DÐ' BÑ'Ò'ñ #ð ˆøô ó Ø–ûðús   �+«
Aµ=½Ac                 ó,   • [        U R                  5      $ r   )Ústrr'   ©r   s    r   Ú__str__ÚCommandChainDispatcher.__str__t   s   € Ü�4—:‘:‹Ðr   c                 óp   • U R                   R                  X!45        U R                   R                  S S9  g)z0Add a func to the cmd chain with given priority c                 ó   • U S   $ )Nr   r    )Úxs    r   Ú<lambda>Ú,CommandChainDispatcher.add.<locals>.<lambda>z   s   €  a¨¢dr   )ÚkeyN)r'   ÚappendÚsort)r   ÚfuncÚprioritys      r   ÚaddÚCommandChainDispatcher.addw   s)   € à�
‰
×Ñ˜8Ð*Ô+Ø�
‰
�‰™NˆÒ+r   c                 ó,   • [        U R                  5      $ )zEReturn all objects in chain.

Handy if the objects are not callable.
)Úiterr'   r6   s    r   Ú__iter__ÚCommandChainDispatcher.__iter__|   s   € ô
 �D—J‘JÓÐr   r&   r   )r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r)   r2   r7   rC   rG   Ú__static_attributes__r    r   r   r#   r#   V   s    † ñô"òò ô,õ
 r   r#   c                 ó   • [         e)zRun a string through pager r   )r   ÚdataÚstartÚscreen_liness       r   r   r   „   s	   € ô €Mr   c                 óÚ   • SSK JnJnJnJn  [
        R                  S:X  a  X2/nO[
        R                  S:X  a  X/nOXB/n[        5       nU H  nUR                  U5        M     U" 5       nU$ )z!Get text from the clipboard.
    é   )Úosx_clipboard_getÚtkinter_clipboard_getÚwin32_clipboard_getÚwayland_clipboard_getÚwin32Údarwin)	Úlib.clipboardrU   rV   rW   rX   ÚsysÚplatformr#   rC   )	r   rU   rV   rW   rX   r'   Ú
dispatcherrA   Útexts	            r   r	   r	   ‹   sh   € ÷ó ô ‡|�|�wÓØ$Ð<‰Ü	�‰˜Ó	!Ø"Ð:‰à&Ð>ˆÜ'Ó)€JÛˆØ�‰�tÖñ á‹<€DØ€Kr   )NT)rM   r   r   r\   Úerrorr   Ú__all__r   r   r#   r   r	   r    r   r   Ú<module>rb      s?   ðñóJ 
Û Û 
å ò
€ôò8÷+ ñ + ò\ór   