|8:ۇNdZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddlZddlmZddlmZddlmZddlmZddlmZddlmZdd lmZddlZddlZeej2d d s4d D]Zeeeej2d ez=dej2d _dZ dZee_ee _d4dZ" d5dZ#da$dZ%e%dejLZ'e'fdZ(da)da*da+d6dZ,dZ-dZ.dZ/dZ0dZ1dZ2dZdZ3dZ4d Z5d!Z6d"Z7Gd#d$ejpZ9Gd%d&ejtZ;Gd'd(e;Z<Gd)d*e;Z=Gd+d,ej|Z?Gd-d.Z@eAd/k(rdd0lBm,Z,e,d1d23e%dy#e!$rYwxYw)7z idlelib.run Simplified, pyshell.ModifiedInterpreter spawns a subprocess with f'''{sys.executable} -c "__import__('idlelib.run').run.main()"''' '.run' is needed because __import__ returns idlelib, not idlelib.run. N) autocomplete)calltip) debugger_r) debugobj_r)iomenu)rpc) stackviewerz idlelib.runfirstrun) simpledialog messageboxfontdialog filedialog commondialogttkztkinter.Fz 127.0.0.1zCtrl-D (end-of-file)cd}|d|d|dz }|tj||}|j}|r|d|zz }||jd|dz }|S)zFormat warnings the IDLE way.z! Warning (from warnings module): z File "z", line  z %s : ) linecachegetlinestrip__name__)messagecategoryfilenamelinenoliness 2/opt/alt/python312/lib64/python3.12/idlelib/run.pyidle_formatwarningr 3sy .A9XJixr 22A |  62 ::> #) ;;  !    U #  !llnOD% !""&&T{3   ))$rOsq:DE D&#!D5?ED#& D2/E1D22E5E  E E  EG9#-G9+F??3G42G9crtdD])}tj| t|t}n+t dtjt|da y|jy#t $r:}t d|jdzdztj|}Yd}~d}~wwxYw)NzIDLE Subprocess: OSError: r5z, retrying....r7z8IDLE Subprocess: Connection to IDLE GUI failed, exiting.T) rangetimesleep MyRPCServer MyHandlerr&rEr<r#rFshow_socket_errorrLhandle_request)addressiservererr socket_errors rrIrIs 1X 1   )4F   *03 @,0   .!<"#), 9L sA33 B6<0B11B6c ddl}ddlm}|j}t ||j |dd|dd|dd|j d |jd | |jy) z(Display socket error from manage_socket.rN) showerrorzSubprocess Connection Errorz#IDLE's subprocess can't connect to :r5z. Fatal OSError #rzz. See the 'Startup failure' section of the IDLE doc, online at https://docs.python.org/3/library/idle.html#startup-failure)parent) tkintertkinter.messageboxrtTk fix_scalingwithdrawerrnostrerrordestroy)rqrnrwrtroots rrlrls{, 7:: jt||j}|j}|8t| vr+ t |||j t d nE|C|js7t| vr* t |||j t d |rGtj|}t d d}t||tj| t|||}|D]}t |d y)NzF The above exception was the direct cause of the following exception: r7zE During handling of the above exception, another exception occurred: z"Traceback (most recent call last):)zrun.pyzrpc.pyz threading.pyzqueue.pyz debugger_r.pyzbdb.pyr8)endr') addid __context__ __cause__ra __traceback__rE__suppress_context__rY extract_tbcleanup_traceback print_listr) rrrccontextcausetbeexcludelinesrefile print_excseens rrz"print_exception..print_excs C//   E$!6 d5k5%*=*= > 28= ?!**k% d7mWg.C.C D 28= ? &&r*C 6U C2G c7 +  5 1!#sB/D $BU +r!) r checkcache flush_stdoutr#r$rW last_type last_valuelast_tracebacklast_excset)rrvalrcexcinforrrs @@@rrXrXslIN JJE \\^+LCb78?5CM3>3#5CL 5D,2c3r!c|dd}|r'|D]}|ddj|snn|d=|r'|r'|D]}|ddj|snn|d=|r't|dk(r#|dd|ddtdtjt j dj}tt|D]E}||\}}}} |dk(rd}| s'|jd r|jd d ||fi} |||| f||<Gy) zARemove excluded traces from beginning/end of tb; get cached linesNrr6z** IDLE Internal Exception: r7exec?z -toplevel-z (33J 3r7^a5BD 9B k2((i/12h.setrecursionlimitXs @B B =FEqyAC C!,,U5I-IJJ =)),T 7<= = =s <"Az# This IDLE wrapper adds z7 to prevent possible uninterruptible loops.c2jtz SN)rr)getrecursionlimitsrrz:install_recursionlimit_wrappers..getrecursionlimitms ,,.1EEEr!z( This IDLE wrapper subtracts z# to compensate for the z" IDLE adds when setting the limit.N) functoolswrapsr#rrrr)rrs@@rinstall_recursionlimit_wrappersrTs__S**+K,K  #$$8#9:#&'__S**+F,F #))=(>?)**LPQ #//14HHI-C-Cr!c\ttjddrttjddrutjjt_tjjt_tjtjt z yyy)zUninstall the recursion limit wrappers from the sys module. IDLE only uses this for tests. Users can import run and call this to remove the wrapping. rN)getattrr#rrrrrr!r!uninstall_recursionlimit_wrappersr|sy C))=$ ? C))=$ ? # 5 5 A A # 5 5 A A c3358LLM @ @r!ceZdZdZy)rjc #t$rt$rdatjYy t j }ttjdddtjjd|d|d |tjd| ttjd d|datjYy xYw) zrOverride RPCServer method for IDLE Interrupt the MainThread and exit server if link is dropped. Tz z(----------------------------------------zU Unhandled exception in user code execution server!' Thread: z" IDLE Client Address: z Request: r7i)rr'a *** Unrecoverable, server exiting! Users should never see this message; it is likely transient. If this recurs, report this with a copy of the message and an explanation of how to make it repeat. N)rVEOFErrorrLthreadinterrupt_mainr#rFrErrrGcurrent_threadr;rYrrU)selfr\client_addresserfs r handle_errorzMyRPCServer.handle_errors $    $H  ! ! # $..C (//' H--/4456""0!12[! #      c 4 (//' H # #  $H  ! ! #s(CB*CN)r __module__ __qualname__rrr!rrjrjs!$r!rjcJeZdZddZedZedZedZdZy) StdioFilecb||_ddi|j_||_||_||_y)Nwidthr5)shell_RPCProxy__attributestags _encoding_errors)rrrencodingerrorss r__init__zStdioFile.__init__s0 -4Q< ( ! r!c|jSr)rrs rrzStdioFile.encodings ~~r!c|jSr)rrs rrzStdioFile.errorss ||r!c d|jzS)Nz<%s>)rrs rr;zStdioFile.names !!r!cyNTrrs risattyzStdioFile.isattyr!N)zutf-8strict) rrrrpropertyrrr;rrr!rrrsH""r!rceZdZdZdZy) StdOutputFilecyrrrs rwritablezStdOutputFile.writablerr!c|jr tdtj||j|j j |j|j }|jj||jS)Nzwrite to closed file) closedrstrencoderrdecoderr%r)rrs rr%zStdOutputFile.writes_ ;;34 4 JJq$-- 5 < )myseqwait) Executiveregisterget_remote_proxyr"rrrrr#r#rr$r$r displayhookpydoc plainpagerpager _keep_stdinrr& RPCHandler getresponse)r executiver-s rhandlezMyHandler.handle sdO  fi(,,Y7  w!'&--A "4<<#)??FMMC "4<<#)??4FH //&& 99')++H5  ""4t$"?r!c.tjdy)z>override SocketIO method - wait for MainThread to shut us down N)rhrirs rexithookzMyHandler.exithook%s  2r!c0datjy)zEOverride SocketIO method - terminate wait on callback and exit threadTNrUrrrs rEOFhookzMyHandler.EOFhook)r!c0datjy)zinterrupt awakened threadTNr9rs rdecode_interrupthookzMyHandler.decode_interrupthook/r;r!N)rrrr4r7r:r=rr!rrkrk s@4  r!rkc>eZdZdZdZdZdZdZdZdZ d d Z y) r)c||_tjdurHtj|_t j|_tj|_yi|_y)NF) ridlelibtesting__main____dict__localsrCalltipr AutoComplete)rrs rrzExecutive.__init__8sH$ ??e #"++DK"??,DL , 9 9 ;D DKr!c> d|_da t||jda t y#dawxYw#t $rq}|j r[|j d}t|tdtfs,tdt|ztjYd}~yYd}~yYd}~yd}~wtj|_tr t!tj"tj$ur t'nH tj"|jn*#tj|_t'YnxYw|j(j*j-d}|r&|j(j.j1YyYyxYw)NTFrz SystemExit: r7z<>) user_exc_info interruptiblerrDrrVr<rrarDrEr r#r$rWrUrM excepthookrrXrr"getvarr&open_remote_stack_viewer)rcodeeobjits rruncodezExecutive.runcodeAs1 !%D  M &T4;;' % . N/!&  EvvVVAY!"tDz3&78.3r72DD9  B!$D ~~!3!33!&NND$6$67&),D&#%//))001NOC&&??As@ 70747 FAB,,AFD#"F#%E AFc:trtjyyr)rIrrrs rinterrupt_the_serverzExecutive.interrupt_the_serverbs   ! ! # r!cBtj|j|Sr)rstart_debuggerr)r gui_adap_oids rstart_the_debuggerzExecutive.start_the_debuggerfs((,GGr!c:|jj|y)zDUnregister the Idb Adapter. Link objects and Idb then subject to GCN)r unregister)r idb_adap_oids rstop_the_debuggerzExecutive.stop_the_debuggeris ""<0r!c8|jj|Sr)r fetch_tip)rr;s rget_the_calltipzExecutive.get_the_calltipms||%%d++r!c:|jj||Sr)rfetch_completions)rwhatmodes rget_the_completion_listz!Executive.get_the_completion_listps  224>>r!Ncn|jr|j\}}}nyd}||jj|}|rE|jjddvr*|j }|r|jjddvr*||_tj||}tj|S)Nr)rrun) rHrr+tb_frame f_globalstb_nextrr StackTreeItemrremote_object_tree_item)r flist_oid_rrcflistitems rr zExecutive.stackviewerss   ++JAsB  OO44Y?ER[[**:6.HBR[[**:6.H((e411$77r!r) rrrrrQrSrWr[r^rcr rr!rr)r)6s,B$H1,? 8r!r)rB)rdzidlelib.idle_test.test_run) verbosityr)NN)F)CrrrrrrQr#rrhrY_threadrrGr+r@rrrrrrr rBrwhasattrmodulesmoddelattrr rJeofrMquitrr r(r*r.Tclr2r3rLrUrIrdrIrlrrXrrrzrrrr RPCServerrj TextIOBaserrrr1rkr)runittestrr!rr|s     s{{=):6  KK S( )  +0CKK '   CDHDH  >B   )gkkm   L\&" 9#J!>"  1=%.P N#$#--#$P 6 .I .,9,^* * ZI8I8X z %3o  s6FF$#F$