Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/IPython/terminal/pt_inputhooks/__pycache__/asyncio.cpython-39.pyc
Ðазад
a o�h4 � @ s2 d Z ddlmZ ddlmZ e�d�Zdd� ZdS )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_loopz3.c sV t rdS t� � � fdd�}| �� }� �||� z� �� W � �|� n� �|� 0 dS )z7 Inputhook for asyncio event loop integration. Nc s � � � d S )N)�stop� ��loopr ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/IPython/terminal/pt_inputhooks/asyncio.pyr 6 s zinputhook.<locals>.stop)�PTK3r �filenoZ add_readerZrun_foreverZ remove_reader)�contextr r r r r � inputhook% s r N) �__doc__Zprompt_toolkitr Zptk_versionZIPython.core.async_helpersr � startswithr r r r r r �<module> s
| ver. 1.1 | |
.
| PHP 8.3.30 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка