a  ze @sFddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z Gdddej Z GdddejZedkrBeZeed eiZd D]Zeeee<qe eeZdad az ddlZWneyYn0eZd e_ez eWn4e y:tr2t!s2t"d aYqYq0qBqdS) N)futurescs$eZdZfddZddZZS)AsyncIOInteractiveConsolecs*t||jjjtjO_||_dS)N)super__init__compileZcompilerflagsastZPyCF_ALLOW_TOP_LEVEL_AWAITloop)selflocalsr  __class__D/opt/bitninja-python-dojo/embedded/lib/python3.9/asyncio/__main__.pyrs z"AsyncIOInteractiveConsole.__init__csptjfdd}t|z WStyBYn*tyjtr^ dn Yn0dS)Nc sdadatj}z |}Wntty4Ynbtyf}zda|WYd}~dSd}~0ty}z|WYd}~dSd}~00t |s |dSzj |attWn0ty}z|WYd}~n d}~00dS)NFT) repl_futurerepl_future_interruptedtypes FunctionTyper SystemExitKeyboardInterrupt set_exception BaseExceptioninspectZ iscoroutine set_resultr Z create_taskrZ _chain_future)funccoroexexccodefuturer rrcallbacks,       z3AsyncIOInteractiveConsole.runcode..callbackz KeyboardInterrupt ) concurrentrFuturer call_soon_threadsaferesultrrrwriteZ showtraceback)r r r"rrrruncodes      z!AsyncIOInteractiveConsole.runcode)__name__ __module__ __qualname__rr( __classcell__rrr rrs rc@seZdZddZdS) REPLThreadc CsvzRdtjdtjdttddd}tj|ddWtjd 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...)bannerZexitmsgignorez ^coroutine .* was never awaited$)messagecategory) sysversionplatformgetattrconsoleZinteractwarningsfilterwarningsRuntimeWarningr r%stop)r r.rrrrunFs* zREPLThread.runN)r)r*r+r;rrrrr-Dsr-__main__asyncio> __builtins____spec__ __loader__ __package____file__r)FT)#r r=r concurrent.futuresr#rr2 threadingrr7rZInteractiveConsolerThreadr-r)Znew_event_loopr Zset_event_loopZ repl_localskeyr r6rrreadline ImportErrorZ repl_threaddaemonstartZ run_foreverrdonecancelrrrrsF 6