§
    �Ÿj4  ã                   óH   — d Z ddlmZ ddlmZ  ej        d¦  «        Zd„ ZdS )a\  
Inputhook for running the original asyncio event loop while we're waiting for
input.

By default, in IPython, we run the prompt with a different asyncio event loop,
because otherwise we risk that people are freezing the prompt by scheduling bad
coroutines. E.g., a coroutine that does a while/true and never yield back
control to the loop. We can't cancel that.

However, sometimes we want the asyncio loop to keep running while waiting for
a prompt.

The following example will print the numbers from 1 to 10 above the prompt,
while we are waiting for input. (This works also because we use
prompt_toolkit`s `patch_stdout`)::

    In [1]: import asyncio

    In [2]: %gui asyncio

    In [3]: async def f():
       ...:     for i in range(10):
       ...:         await asyncio.sleep(1)
       ...:         print(i)


    In [4]: asyncio.ensure_future(f())

é    )Ú__version__)Úget_asyncio_loopz3.c                 ó  ‡— t           rdS t          ¦   «         Šˆfd„}|                      ¦   «         }‰                     ||¦  «         	 ‰                     ¦   «          ‰                     |¦  «         dS # ‰                     |¦  «         w xY w)z7
    Inputhook for asyncio event loop integration.
    Nc                  ó0   •— ‰                       ¦   «          d S )N)Ústop)Úloops   €ús/var/www/finuniver-perm.ru/html/student/venv/lib/python3.11/site-packages/IPython/terminal/pt_inputhooks/asyncio.pyr   zinputhook.<locals>.stop6   s   ø€ Ø�	Š	‰Œˆˆˆó    )ÚPTK3r   ÚfilenoÚ
add_readerÚrun_foreverÚremove_reader)Úcontextr   r   r   s      @r	   Ú	inputhookr   %   s¨   ø€ õ ð Øˆõ ÑÔ€Dðð ð ð ð ð �^Š^ÑÔ€FØ‡O‚O�F˜DÑ!Ô!Ð!ð#Ø×ÒÑÔÐà×Ò˜6Ñ"Ô"Ð"Ð"Ð"øˆ×Ò˜6Ñ"Ô"Ð"Ð"øøøs   Á	A4 Á4BN)	Ú__doc__Úprompt_toolkitr   Úptk_versionÚIPython.core.async_helpersr   Ú
startswithr   r   © r
   r	   ú<module>r      s`   ððð ð: 6Ð 5Ð 5Ð 5Ð 5Ð 5à 7Ð 7Ð 7Ð 7Ð 7Ð 7à€{Ô˜dÑ#Ô#€ð#ð #ð #ð #ð #r
   