grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026 й¼]†'ã@sùddlZddlZddlZddlmZmZddddgZGdd„dƒZGdd„deƒZdddd d„Z e d krõej ƒZ e j d d d ddƒe jƒZejsÜejjrådZndZe eƒdS)éN)ÚCommandCompilerÚcompile_commandÚInteractiveInterpreterÚInteractiveConsoleÚinteractrc@sdeZdZddd„Zdddd„Zdd „Zdd d „Zd d „Zdd„ZdS)rNcCs7|dkrddddi}||_tƒ|_dS)NÚ__name__Z __console__Ú__doc__)ÚlocalsrÚcompile)Úselfr ©r ú)/opt/alt/python35/lib64/python3.5/code.pyÚ__init__s  zInteractiveInterpreter.__init__zZsinglec Csiy|j|||ƒ}Wn,tttfk rG|j|ƒdSYnX|dkrXdS|j|ƒdS)NFT)r Ú OverflowErrorÚ SyntaxErrorÚ ValueErrorÚshowsyntaxerrorÚruncode)r ÚsourceÚfilenameÚsymbolÚcoder r r Ú runsource's    z InteractiveInterpreter.runsourcec CsAyt||jƒWn&tk r+‚Yn|jƒYnXdS)N)Úexecr Ú SystemExitÚ showtraceback)r rr r r rNs  zInteractiveInterpreter.runcodec Csîtjƒ\}}}|t_|t_|t_|rš|tkršy|j\}\}}}} Wntk ruYn%Xt||||| fƒ}|t_tjtj kr×t j ||ƒ} |j dj | ƒƒntj|||ƒdS)NÚ)ÚsysÚexc_infoÚ last_typeÚ last_valueÚlast_tracebackrÚargsrÚ excepthookÚ__excepthook__Ú tracebackÚformat_exception_onlyÚwriteÚjoin) r rÚtypeÚvalueÚtbÚmsgZdummy_filenameÚlinenoÚoffsetÚlineÚlinesr r r ras      z&InteractiveInterpreter.showsyntaxerrorc Cs¤tjƒ\t_t_}}|t_zjtj|d|d|jƒ}tjtj krv|j dj |ƒƒntj|d|d|ƒWdd}}XdS)Nrér) rrrr r!r%Úformat_exceptionÚtb_nextr#r$r'r()r Zlast_tbÚeir0r r r r„s  z$InteractiveInterpreter.showtracebackcCstjj|ƒdS)N)rÚstderrr')r Údatar r r r'™szInteractiveInterpreter.write) rÚ __module__Ú __qualname__rrrrrr'r r r r rs ' # c@sXeZdZdddd„Zdd„Zddd„Zd d „Zd d d „ZdS)rNz cCs'tj||ƒ||_|jƒdS)N)rrrÚ resetbuffer)r r rr r r r«s  zInteractiveConsole.__init__cCs g|_dS)N)Úbuffer)r r r r r9¹szInteractiveConsole.resetbufferc!CsTy tjWntk r(dt_YnXy tjWntk rQdt_YnXd}|dkr�|jdtjtj||jjfƒn|r­|jdt |ƒƒd}xšyd|rËtj}n tj}y|j |ƒ}Wn t k r |jdƒPYnX|j |ƒ}Wq¶t k rK|jdƒ|jƒd}Yq¶Xq¶WdS) Nz>>> z... zFType "help", "copyright", "credits" or "license" for more information.zPython %s on %s %s (%s) z%s rÚ z KeyboardInterrupt )rZps1ÚAttributeErrorZps2r'ÚversionÚplatformÚ __class__rÚstrÚ raw_inputÚEOFErrorÚpushÚKeyboardInterruptr9)r ÚbannerZcprtÚmoreÚpromptr/r r r r½s>              zInteractiveConsole.interactcCsK|jj|ƒdj|jƒ}|j||jƒ}|sG|jƒ|S)Nr;)r:Úappendr(rrr9)r r/rrFr r r rCês  zInteractiveConsole.pushrcCs t|ƒS)N)Úinput)r rGr r r rAÿs zInteractiveConsole.raw_input)rr7r8rr9rrCrAr r r r r£s  - c CsZt|ƒ}|dk r$||_n%yddl}Wntk rHYnX|j|ƒdS)Nr)rrAÚreadlineÚ ImportErrorr)rEZreadfuncÚlocalZconsolerJr r r rs    Ú__main__z-qÚactionÚ store_trueÚhelpz*don't print version and copyright messagesr)rr%ÚargparseZcodeoprrÚ__all__rrrrÚArgumentParserÚparserÚ add_argumentÚ parse_argsr"ÚqÚflagsÚquietrEr r r r Ús"     “k