a XC?h3 �@sTddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z Gdd�dej �Z Gdd�dej�Zedk�rPe�d �e��Ze�e�d eiZd D]Ze�eee<q�e ee�Zdad az ddlZWney�Yn0e�Zd e_e��z e� �Wn6e!�yFt�r.callbackz KeyboardInterrupt ) � concurrentrZFuturer �call_soon_threadsafe�resultrrr�writeZ showtraceback)r rrrrr�runcodes      z!AsyncIOInteractiveConsole.runcode)�__name__� __module__� __qualname__rr#� __classcell__rrr rrs rc@seZdZdd�ZdS)� REPLThreadc CsvzRdtj�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)r r)rrr�runFs* ������zREPLThread.runN)r$r%r&r6rrrrr(Dsr(�__main__zcpython.run_stdin�asyncio>� __package__�__file__�__spec__r$� __builtins__� __loader__FT)$r r8rZconcurrent.futuresrrr-Z threadingrr2�rZInteractiveConsolerZThreadr(r$�auditZnew_event_loopr Zset_event_loopZ repl_locals�keyr r1rr�readline� ImportErrorZ repl_threadZdaemon�startZ run_foreverrZdoneZcancelrrrr�sH 6