Qf*< ddlZddlZddlmZmZgdZGddZGddeZddZe d k(riddl Z e jZ e jd d d e jZej sej"j$rdZndZeeyy)N)CommandCompilercompile_command)InteractiveInterpreterInteractiveConsoleinteractrc>eZdZ d dZd dZdZd dZdZdZdZ y) rNc@ |ddd}||_t|_y)N __console__)__name____doc__)localsrcompile)selfr s +/opt/alt/python312/lib64/python3.12/code.py__init__zInteractiveInterpreter.__init__s)  >"/DAF &( c |j|||}|y|j |y#tttf$r|j |YywxYw)NFT)r OverflowError SyntaxError ValueErrorshowsyntaxerrorruncode)rsourcefilenamesymbolcodes r runsourcez InteractiveInterpreter.runsource&sb . <<&9D < T{J7    * s+%AAct t||jy#t$r|jYyxYwN)execr SystemExit showtraceback)rrs rrzInteractiveInterpreter.runcodeMs8  ! t{{ #   !    s7c tj\}}}|r-|tur% |j\}\}}}} t||||| f}|j ||ddx}x}}y#t$rY%wxYw#dx}x}}wxYwr)sysexc_inforargsr_showtraceback) rrtypvaluetbmsgdummy_filenamelinenooffsetlines rrz&InteractiveInterpreter.showsyntaxerror`s  $ \\^NCC;.OBG**?C?.&&$ (h-MNE   UD 1# #C #%"" $ #C #%"s-"A3A$#A3$ A0-A3/A00A33A;c tj\}}}|j|||jdx}x}}y#dx}x}}wxYwr)r$r%r'tb_next)rr(r)r*s rr"z$InteractiveInterpreter.showtraceback|sR  $ \\^NC   UBJJ 7# #C #%"t #C #%"s 5?Ac|t_|t_|j|xt_xt_}tj tjur8tj|||}|jdj|y tj |||y#t$rt$r}d|_|j|jj }t#dtj$tjt'|||jt#tj$t#dtj$tj|||Yd}~yd}~wwxYw)NzError in sys.excepthook:)filezOriginal exception was:)r$ last_typelast_tracebackwith_tracebacklast_exc last_value excepthook__excepthook__ tracebackformat_exceptionwritejoinr! BaseException __context__ __traceback__r1printstderrtype)rr(r)r*lineses rr'z%InteractiveInterpreter._showtracebacks 050D0DR0HH Hs~ >>S// /..sE2>E JJrwwu~ & 3sE2.   3 $ $$Q__%<%<=0szzB""47Aq?3::&/cjjA""3r22 3sB//FB=FFcD tjj|yr)r$rDr>)rdatas rr>zInteractiveInterpreter.writes rr)zsingle) r __module__ __qualname__rrrrr"r'r>rrrrs+ )%N!&$8 $3.rrc2eZdZ ddZdZddZdZd dZy) rNc` tj||||_|jyr)rrr resetbuffer)rr rs rrzInteractiveConsole.__init__s,  ''f5   rc g|_yr)buffer)rs rrPzInteractiveConsole.resetbuffers % rc \ tj tjd}|O|j dtj dtj d|d|jjd n|r|j d t|zd } |rtj}ntj} |j|}|j|} I#t$rdt_YwxYw#t$rdt_YwxYw#t$r|j dYn6wxYw#t$r&|j d |jd }YwxYw|)|j d |jjzy|d k7r|j d |zyy)Nz>>> z... zFType "help", "copyright", "credits" or "license" for more information.zPython z on  z (z) z%s rz KeyboardInterrupt znow exiting %s... r3)r$ps1AttributeErrorps2r>versionplatform __class__r str raw_inputpushEOFErrorKeyboardInterruptrP)rbannerexitmsgcprtmorepromptr/s rrzInteractiveConsole.interactsx   GG  GGX > JJ S\\4//1 2 JJvF + ,  WWF WWF+>>&1D  99T?D CG  CG $ JJt$ %  23  "  ? JJ,t~~/F/FF G ] JJv' (sXC"C<#D6>DD6"C98C9<DDD30D62D33D66,E%$E%c |jj|dj|j}|j||j}|s|j |S)NrT)rRappendr?rrrP)rr/rrcs rr]zInteractiveConsole.pushsU  4 4;;'~~fdmm4     rc t|Sr)input)rrds rr\zInteractiveConsole.raw_inputs V}r)Nz )NN)r3)r rKrLrrPrr]r\rMrrrrs! 4)l* rrc| t|}|||_n ddl}|j ||y#t$rYwxYw)Nr)rr\readline ImportErrorr)r`readfunclocalraconsolerjs rrrsO !'G$   VW%   s / ;;__main__z-q store_truez*don't print version and copyright messages)actionhelpr3)NNNN)r$r<codeoprr__all__rrrr argparseArgumentParserparser add_argument parse_argsr&qflagsquietr`rMrrr}s 3 YYxp/ph&4 z $X $ $ &F \HJ    D vv Vr