HEX
Server: Apache/2.4.65 (Unix) OpenSSL/1.1.1k
System: Linux vps109042.inmotionhosting.com 4.18.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User: cisa (1010)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //opt/imh-python/lib/python3.9/asyncio/__pycache__/__main__.cpython-39.pyc
a

b�h
�@sFddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZGdd�dej�Z
Gdd�dej�Zedk�rBe��Ze�e�d	eiZd
D]Ze�eee<q�e
ee�ZdadazddlZWney�Yn0e�Zde_e��ze��Wn4e �y:t�r2t�!��s2t�"�daYq�Yq�0�qBq�dS)
�N�)�futurescs$eZdZ�fdd�Zdd�Z�ZS)�AsyncIOInteractiveConsolecs*t��|�|jjjtjO_||_dS)N)�super�__init__�compileZcompiler�flags�astZPyCF_ALLOW_TOP_LEVEL_AWAIT�loop)�self�localsr
��	__class__��1/opt/imh-python/lib/python3.9/asyncio/__main__.pyrsz"AsyncIOInteractiveConsole.__init__csptj������fdd�}t�|�z
���WStyB�Yn*tyjtr^��	d�n��
�Yn0dS)Nc
sdadat���j�}z
|�}Wntty4�Ynbtyf}zda��|�WYd}~dSd}~0ty�}z��|�WYd}~dSd}~00t	�
|�s���|�dSz�j�
|�at�t��Wn0t�y�}z��|�WYd}~n
d}~00dS)NFT)�repl_future�repl_future_interrupted�types�FunctionTyper�
SystemExit�KeyboardInterrupt�
set_exception�
BaseException�inspectZiscoroutine�
set_resultr
Zcreate_taskrZ
_chain_future)�func�coro�ex�exc��code�futurerrr�callbacks,




z3AsyncIOInteractiveConsole.runcode.<locals>.callbackz
KeyboardInterrupt
)�
concurrentr�Futurer
�call_soon_threadsafe�resultrrr�writeZ
showtraceback)rr r"rrr�runcodes


z!AsyncIOInteractiveConsole.runcode)�__name__�
__module__�__qualname__rr(�
__classcell__rrr
rrsrc@seZdZdd�ZdS)�
REPLThreadcCsvzRdtj�dtj�dttdd��d�}tj|dd�Wtjd	d
td�t	�
t	j�ntjd	d
td�t	�
t	j�0dS)Nz
asyncio REPL z on zy
Use "await" directly instead of "asyncio.run()".
Type "help", "copyright", "credits" or "license" for more information.
Zps1z>>> zimport asynciozexiting asyncio REPL...)�bannerZexitmsg�ignorez ^coroutine .* was never awaited$)�message�category)�sys�version�platform�getattr�consoleZinteract�warnings�filterwarnings�RuntimeWarningr
r%�stop)rr.rrr�runFs*
������zREPLThread.runN)r)r*r+r;rrrrr-Dsr-�__main__�asyncio>�__file__�__package__�
__loader__�__spec__�__builtins__r)FT)#r	r=r �concurrent.futuresr#rr2�	threadingrr7�rZInteractiveConsoler�Threadr-r)Znew_event_loopr
Zset_event_loopZrepl_locals�keyrr6rr�readline�ImportErrorZrepl_thread�daemon�startZrun_foreverr�done�cancelrrrr�<module>sF6