eUSSKr\S:Xa\RS\RS'SSK7 \RS:Xa SS K J r \ "5 SS KJ r SS K J r SSKrSSKrSSKrSSKrSS KJr SSKrSSKrSSKrSS KJr SSKrSSKrSSKrSSKrSSKJr SSKJr SSK J!r! SSK"J#r# SSK"J$r$ SSK%J&r&J'r' SSK(J)r) SSK*J+r+ SSK"J,r, SSK"J-r- SSK.J/r/J0r0J1r1 SSK2J3r3 Sq4Sr5Sr6Sr7\7\8l7\7\9l7\R q;S5Sjr\>"S5 S\R~4S jr@\@\l?"S!S"\&5rA"S#S$\)5rB"S%S&\5rC"S'S(\35rD"S)S*\!5rE"S+S,\-R5rGS-rH"S.S/\ 5rI"S0S1\+5rJS2rKS3rLS4rM\S:Xa\M"5 \>"S5 g!\a \"S\R S9 \"S5ef=f!\:a Nf=f)6N__main__zidlelib.pyshell)*zJ** IDLE can't import Tkinter. Your Python may not be configured for Tk. **filewin32) fix_win_hidpi) messagebox)InteractiveInterpreter)python_version) TextWrapper)ColorDelegator)idleConf) Delegatordebugger) debugger_r) EditorWindow fixwordbreaks)FileList) OutputWindow)replace)rpc)idle_formatwarning StdInputFile StdOutputFile) UndoDelegatorFz 127.0.0.1zCtrl-D (end-of-file)c Uc[nUR[XX#US95 URS5 g![[4a gf=f)zShow Idle-format warning (after replacing warnings.showwarning). The differences are the formatter called, the file=None replacement, which can be None, the capture of the consequence AttributeError, and the output of a hard-coded prompt. N)linez>>> )warning_streamwriterAttributeErrorOSError)messagecategoryfilenamelinenorrs 5/opt/imh/python3.13/lib/python3.13/idlelib/pyshell.pyidle_showwarningr)CsS |  %8$@ A 6 G $   s+7A  A cU(a([c [Rq[[lgg[b[[lSqgg)z>Replace warning.showwarning with idle_showwarning, or reverse.N)_warnings_showwarningwarnings showwarningr))captures r(capture_warningsr/VsA ($,$8$8 !#3H  ) ! ,#8H $( ! -Tc[Rn0n[U5H'nUSSUSS-S:XdMURU5X4'M) U"U5 UR U5 g)aWExtend linecache.checkcache to preserve the entries Rather than repeating the linecache code, patch it to save the entries, call the original linecache.checkcache() (skipping them), and then restore the saved entries. orig_checkcache is bound at definition time to the original method, allowing it to be patched. Nr<>) linecachecachelistpopupdate)r&orig_checkcacher5savekeys r(extended_linecache_checkcacher<es^ OOE DE{ r7SX  % #DIH LLr0cn\rSrSrSrSr/SQrSSjrSrSSjr SS jr S r S r S r S rSrSrSrg)PyShellEditorWindow|z6Regular text edit window in IDLE, supports breakpointsc/Ul[R"U/UQ76 URR SUR 5 URR SUR 5 URR SURR5 [RR[RS5UlURR U4SjnURR#U5 URR$(aUR'5 UR)5 g)N<><>z<>zbreakpoints.lstc2UR5 U"5 gN)restore_file_breaks)old_hookselfs r(filename_changed_hook;PyShellEditorWindow.__init__..filename_changed_hooks  $ $ & Jr0) breakpointsr__init__textbindset_breakpoint_eventclear_breakpoint_eventflist open_shellospathjoinruserdirbreakpointPathiofilename_change_hookset_filename_change_hookr&rEcolor_breakpoint_text)rGargsrHs r(rKPyShellEditorWindow.__init__sd*T* +T-F-FG -t/J/JK . 0E0EF!ggll  "35,077+G+G'+  (()>? 77    $ $ & ""$r0))Cutz<>rmenu_check_cut)Copyz<>rmenu_check_copy)Pastez <>rmenu_check_paste)NNN)zSet BreakpointrAN)zClear BreakpointrBNcURcgU(a-[R"5n[R"US5nOSSS.nURR SU5 g)z,Turn colorizing of breakpoint text on or offNbreak) foreground backgroundBREAK)rWr CurrentTheme GetHighlightrL tag_config)rGcolorthemecfgs r(rZ)PyShellEditorWindow.color_breakpoint_textsO 77?  ))+E''w7C!#26C Wc*r0cURnURRnURSSU-SUS--5 URR U5 URRRRnURX15 g![ a URRU5 Ndf=f! g=f)Nrhz%d.0r) rLrWr&tag_addrJindex ValueErrorappendrPpyshellinterprset_breakpoint)rGr'rLr&debugs r(rw"PyShellEditorWindow.set_breakpointsyy77## Wfvov/BC ,    " "6 * JJ&&--66E   2  ,    # #F + ,   sB;C%C?CCNcURnURRnU(dUR5 g[ [ UR S555nURU5 g)Ninsert)rLrWr&bellintfloatrrrw)rGeventrLr&r's r(rN(PyShellEditorWindow.set_breakpoint_eventsOyy77## IIK U4::h/01 F#r0cURnURRnU(dUR5 g[ [ UR S555nURRU5 URSSS5 URRRRnURX45 g! NT=f! g=f)Nr{rhinsert linestartzinsert lineend +1char)rLrWr&r|r}r~rrrJremove tag_removerPrurvrclear_breakpoint)rGrrLr&r'rxs r(rO*PyShellEditorWindow.clear_breakpoint_eventsyy77## IIK U4::h/01     # #F + !3/ 1 JJ&&--66E  " "8 4      sC ;C CCc^UR(aURnURRnU(dUR 5 g/UlUR SS[ 5 URRRRnURU5 gg! g=f)Nrh1.0) rJrLrWr&r|rENDrPrurvrclear_file_breaks)rGrLr&rxs r(r%PyShellEditorWindow.clear_file_breakss   99Dww''H !D  OOGUC 0  **11::''1  s +;B((B,c.URnURRn[UR5nUR 5nSSS5 [URS5nWH/nURUS-5(aMURU5 M1 UR5 URnU(a#URUS-[U5-S-5 SSS5 g!,(df  N=f![ a /nNf=f!,(df  g=f![ ahn[URSS5(dBSURl [R"SS [U5-UR S 9 SnAgSnAgSnAff=f) z#Save breakpoints when file is savedNw= breakpoint_error_displayedFTz IDLE Errorz$Unable to update breakpoint list: %s)titler$parent)rJrWr&openrV readlinesr# startswithr!update_breakpointsstrgetattrrootrr showerrorrL)rGbreaksr&fplinesnew_filererrs r(store_file_breaks%PyShellEditorWindow.store_file_breakssG$!!77## d))*b + &d))3/8!D??8c>:: t,"'')))NN8c>CK#?$#FG0/ +* E 0/ &499&BEJJ7; 4$$<Cc(#99&K &slC?C. C?D")D AD%D". C<8C?<C?? D D DD"D"" F,AFFcURR5 URcgURRnUcg[R R UR5(a[UR5nUR5nSSS5 WHRnURUS-5(dM[U[U5S-S5nUHnURU5 M MT gg!,(df  Nh=f)Nrr)rLr8rWr&rRrSisfilerVrrrevallenrw)rGr&rrrbreakpoint_linenumbersbreakpoint_linenumbers r(rE'PyShellEditorWindow.restore_file_breaks s  77? 77##    77>>$-- . .d))*b +??8c>22-1$s8}Q7G2H-I*1G-++,AB2H /**s C99 DclURnURS5nURU5nX0lg)z3Retrieves all the breakpoints in the current windowrhN)rL tag_rangesranges_to_linenumbersrJ)rGrLrangeslinenumber_lists r(r&PyShellEditorWindow.update_breakpointss/yy)44V<*r0c/n[S[U5S5Hjn[[XR55n[[XS-R55nXE:dMMUR U5 US- nXE:aMMl U$)Nrr)rangerr}r~stringrt)rGrrrrr'ends r(r)PyShellEditorWindow.ranges_to_linenumbers#sx1c&k1-Ev}3345FeF7O2234C, V$! ,.  r0cPUR5 [R"U5 g)z7Extend base method - clear breaks when module is closedN)rr_closerGs r(rPyShellEditorWindow._close4s  D!r0)rVrJ)TrD)__name__ __module__ __qualname____firstlineno____doc__rK rmenu_specsrZrwrNrOrrrErrr__static_attributes__r0r(r>r>|sE<%(K + $& (&TC"+""r0r>c*\rSrSrSr\rSrSSjrSr g)PyShellFileListi:z8Extend base class: IDLE supports a shell and breakpointsNcUR(a0URRR5 UR$[U5UlUR(a URR 5(dgUR$rD)rutopwakeupPyShellbeginrGrs r(rQPyShellFileList.open_shellCs_ << LL   # # % || #4=DL||||))++||r0)rurD) rrrrrr>rrurQrrr0r(rr:s>'LGr0rc$\rSrSrSrSrSrSrg)ModifiedColorDelegatoriNz8Extend base class: colorizer for the shell window itselfc|URSSS5 URSSS5 [R"U5 g)NTODOriomarkSYNC)rrqrrecolorize_mainrs r(r&ModifiedColorDelegator.recolorize_mainPs0 x0 VUH-&&t,r0cPURHnURUSS5 M g)Nrr)tagdefsr)rGtags r( removecolors#ModifiedColorDelegator.removecolorsUs <- 2r0rc@^\rSrSrSrSSjrSSjrU4SjrSrU=r $)ModifiedUndoDelegatori[z;Extend base class: forbid insert/delete before the I/O markcURRUSS5(aURR5 g[R "XX#5 g![a N$f=fN^URRmU4SjURl[TU] U5 TURlg!TURlf=f)Nc>T"XS5$Nstdinr)rrr orig_inserts r(2ModifiedUndoDelegator.undo_event..vs U7!Cr0)rr{super undo_event)rGrr __class__s @r(r ModifiedUndoDelegator.undo_eventosN mm** C  / G u %#.DMM ;DMM s AA#rrD) rrrrrr{rrr __classcell__rs@r(rr[sA73 / /r0rc"\rSrSrSrSSjrSrg)UserInputTaggingDelegatori}z.Delegator used to tag user input with "stdin".NcFUcSnURRXU5 gr)rr{rs r(r{ UserInputTaggingDelegator.inserts <D U40r0rrD)rrrrrr{rrr0r(rr}s 81r0rc\rSrSrSrSrg) MyRPCClientic[e)z0Override the base class - just re-raise EOFError)EOFErrorrs r( handle_EOFMyRPCClient.handle_EOFsr0rN)rrrrrrrr0r(rrsr0rcSU=(d SS3nU[U5:a*[U[U5- S5up4X4-S-UUS-3$USS$)zReturn width long restart line formatted with filename. Fill line with balanced '='s, with any extras and at least one at the beginning. Do not end with a trailing space. z = RESTART: Shellz =rrN)rdivmod)widthr&rdivmods r( restart_linersb +G,B /C C5#c(?Q/7C-c#gY//3Bxr0c\rSrSrSrSrSrSrSrSr Sr S"Sjr Sr S r S rS rS#S jrSrS rSrSrSrSrSrSrSrS$SjrSrSrSrS$SjrSrSr Sr!Sr"Sr#Sr$Sr%S r&S!r'g)%ModifiedInterpretericXl[RSRn[R "XS9 SUlSUl[Ul URRRUl g)Nr)localsF) tkconsolesysmodules__dict__r rK restartingsubprocess_arglistPORTportcompilecompilerflagsoriginal_compiler_flags)rGr r s r(rKModifiedInterpreter.__init__sW"Z(11''<"& '+||'<'<'B'B$r0NcURcUR5Ul[[RSS9n[ R "URUS9Ulg)Ndumb)TERM)env)rbuild_subprocess_arglistdictrRenviron subprocessPopen rpcsubproc)rGrs r(spawn_subprocess$ModifiedInterpreter.spawn_subprocesssI  " " *&*&C&C&ED #2::F+$**4+B+BLr0cURS:wdS5e[RVs/sHnSU-PM nn[R"SSSSSS 9nS U<S 3n[R /U-S U[ UR5/-$s snf) Nrz/Socket should have been assigned a port number.z-WmainGeneralzdelete-exitfuncFbool)defaulttypez#__import__('idlelib.run').run.main()-c)rr  warnoptionsr GetOption executabler)rGsr del_exitfcommands r(r,ModifiedInterpreter.build_subprocess_arglists 1  ? = ? " /!TAX /&&vy:K/46C 7 }AF!#tWc$))n&EEE 0sBcJ[UR4n[S5H*n[R"U5 [ U5Ul O UR5 gUR RR5SUl[S:waCUR RR[R[RS5 UR!5 UR RR#S5 UR R%5 UR R+SUR,5 UR R+SUR,R.5 UR R+SUR,R05 UR R+SUR,R25 UR R+S UR,R45 UR R+S [65 UR R+S U5 UR9S S 9 UR;5 UR $![a GMcf=f![&a UR)5 gf=f)Nrr consolerstdoutstderrrPr4rvTwith_cwd)HOSTrrtimesleeprrpccltr#display_port_binding_errorlistening_sock getsocknamer setsockoptsocket SOL_SOCKET SO_REUSEADDRr# settimeoutaccept TimeoutErrordisplay_no_subprocess_errorregisterr rr8r9rPr4 transfer_pathpoll_subprocess)rGaddris r(start_subprocess$ModifiedInterpreter.start_subprocesssdii qA JJqM )$/    + + -KK..::+> C  ""--b1  KK    Y7 Wdnn&:&:; Xt~~'<'<= Xt~~'<'<= Wdnn&:&:; [)4 Xt, D) {{C  *   , , . s#I3 J3 JJJ"!J"cPUR(a UR$SUlUR5nU(a![R"UR5 URR 5 UR 5 URnURnSUlUR5 URR5 URUS9 UR5 URR!SS5 UR#S5 UR#[%UR&U55 URR)SS5 URR+SS5 U(dUR-5 U(a0[R."UR5 UR15 UR2UR4R6lSUlUR$! GN=f![a UR5 gf=f) NTFr:rend-1crrestartleft)rr? getdebuggerrclose_subprocess_debuggercloseterminate_subprocessr  executingr#rHrIrJrL stop_readlinerLrr!rrmark_set mark_gravity showpromptrestart_subprocess_debuggerload_breakpointsrrrr)rGr;r&rxr7 was_executings r(restart_subprocess&ModifiedInterpreter.restart_subprocesss ??;;   "  44T[[A  !!#..)) !   KK    H- Hh/ d l7==(;< i2 !!)V4      2 24;; ?  " " $&*&B&B #{{A    , , . s H7HHH%$H%c@URRSSS05 g)Nexecinterrupt_the_serverr)r? remotecallrs r(__request_interrupt'ModifiedInterpreter.__request_interrupts v'=r2Fr0c\[R"URS9R5 g)N)target) threadingThread'_ModifiedInterpreter__request_interruptstartrs r(interrupt_subprocess(ModifiedInterpreter.interrupt_subprocesss 8 89??Ar0cURb/URRRUR5 URR R 5 URR 5 UR5 SURl SUlg![a NPf=f![a NEf=f)NF) _afteridr rL after_cancelr?rArXr"rYrZrs r(kill_subprocess#ModifiedInterpreter.kill_subprocesss == $ NN   , ,T]] ;  KK & & , , .  KK    !!##(        s#$B&#B6& B32B36 CCcURR5 URR5 g![a gf=f![a gf=f)z"Make sure subprocess is terminatedN)r"killwaitr#rs r(rY(ModifiedInterpreter.terminate_subprocess'sQ  OO "  $$&      s A8 AA AAcU(a#S/nUR[R5 O[RnURSR U55 g)NrezTif 1: import sys as _sys _sys.path = {!r} del _sys )extendr rS runcommandformat)rGr;rSs r(rL!ModifiedInterpreter.transfer_path4sA 4D KK !88D fTl  r0cURnUcgURURSS9nU(aUR R5 SUlUup4UR RnUS:XaUb[[U5US9 OaUS:Xa1UR RS5(aUR5 O*US:Xa$Sn[Xd[R S9 [XdUS9 UR R#5 UR R(dJUR R&R)UR R*UR,5Ulgg![[[ 4a3 UR R(agSnUR5 GNf=f![$a Nf=f) Ng?)ryOKr EXCEPTION<>ERRORz/pyshell.ModifiedInterpreter: Subprocess ERROR: )r? pollresponse active_seqrr#KeyboardInterruptr closingrb resetoutputr7printreprgetvarremote_stack_viewerr  __stderr__ endexecutingr"rLafter pollintervalrMrs)rGcltresponsehowwhatr7errmsgs r(rM#ModifiedInterpreter.poll_subprocessCsxkk ;  &''d'CH  NN & & ("DO ICnn,,Gd{#$t*73 #>>(()FGG,,.Kf8f1 ++-~~%% NN//55++T-A-ACDM&9'#45 &~~%%H  # # %  &2"  s)E--F8-0F5F54F58 GGcXlgrDr)rGrs r( setdebuggerModifiedInterpreter.setdebuggerks r0cUR$rDrrs r(rVModifiedInterpreter.getdebuggerns }}r0cdURRRSUR5 g)abInitiate the remote stack viewer from a separate thread. This method is called from the subprocess, and by returning from this method we allow the subprocess to unblock. After a bit the shell requests the subprocess to open the remote stack viewer which returns a static object looking at the last exception. It is queried through the RPC mechanism. i,N)r rLrrrs r(open_remote_stack_viewer,ModifiedInterpreter.open_remote_stack_viewerqs' !!#t'?'?@r0c SSKJn URRSSS05nUc%URR R 5 gURURU5nSSKJ nJ n [URR 5n[R"5n[R"US5SnU"XhSS 9n U RR!S S S 9 U"U R"SU5n U R%5 g) Nr) debugobj_rre stackviewer)rP)ScrolledCanvasTreeNodenormalrg)bghighlightthicknessrboth)expandfill)idlelibrr? remotequeuer rr|StubObjectTreeItem idlelib.treerrToplevelrrirjframepackcanvasr) rGroiditemrrrrmrgscnodes r(r'ModifiedInterpreter.remote_stack_viewer~s&kk%%fmZL ; NN   $ $ & ,,T[[#>9t~~**+%%'**5(;LI C1 E  QV , 4. r0rcHURU5nURX!5 g)z1Like runsource() but assumes complete exec sourceN) stuffsourceexecfilerGsourcer&s r( execsourceModifiedInterpreter.execsources##F+ h'r0c*Ucc[R"U5nUR5n[(a)S[R R U5S3U-S-nSSS5 [X!S5nURU5 g!,(df  N-=f![[4ak URR5 [SURRS9 [R "X5 URR#5 gf=f)zExecute an existing fileNz__file__ = r'''z''' z del __file__rezB*** Error in script or command! Traceback (most recent call last):r)tokenizerreaduse_subprocessrRrSabspathrruncode OverflowError SyntaxErrorr rrr9r showsyntaxerrorr^)rGr&rrcodes r(rModifiedInterpreter.execfiles >x(B!> /0I/J%P &')9:F) 6V4D LL )({+ ( NN & & ( 6~~,, . # 2 24 B NN % % '  (sAB( B BA8DDcURU5n[U[5(de[R"XU5$)zBExtend base class method: Stuff the source in the line cache first)r isinstancerr runsourcers r(rModifiedInterpreter.runsources:##F+&#&&&&&//hGGr0cSUR-nURS-UlURS5n[U5S-SX24[RU'U$)z"Stuff source in the filename cachez rrr)gidsplitrr4r5)rGrr&rs r(rModifiedInterpreter.stuffsourcesO!DHH,88a< T"$'KM1e$E !r0cDURSRU55 g)z>Prepend sys.path with file's directory if not already includeda*if 1: _filename = {!r} import sys as _sys from os.path import dirname as _dirname _dir = _dirname(_filename) if not _dir in _sys.path: _sys.path.insert(0, _dir) del _filename, _sys, _dirname, _dir N)r}r~rGr&s r(prepend_syspath#ModifiedInterpreter.prepend_syspaths &" $r0c URnURnURSSS5 [R"5upVn[ USS5=(d U=(d Sn[ USS5=(d Sn [ US S5=(d S n U S :XaU S- n U S:Xa S U S- -n O S U S- U S- 4-n UR XK5 UR5 URS U-5 UR5 g)zOverride Interactive Interpreter method: Use Colorizing Color the offending position instead of printing it and pointing at it with a caret. rrrmsgrezr'roffsetrziomark + %d charsz&iomark linestart + %d lines + %d charszSyntaxError: %s N) r rLrr exc_inforcolorize_syntax_errorrr!r^) rGr&kwargsr rLr*valuetbrr'rposs r(r#ModifiedInterpreter.showsyntaxerrorsNN ~~ .,,.ReUB'K5K4K"-2"-2 Q; aKF Q;%2C:!8VAX&'C''2 &,-r0cURR5 UR5 [R"U5 URR S5(aURR 5 gg)z1Extend base class method to reset output properlyrN)r rchecklinecacher showtracebackropen_stack_viewerrs r(r!ModifiedInterpreter.showtracebacksX ""$ ,,T2 >> !> ? ? NN , , . @r0cn[Rn[U5HnUSSUSS-S:wdMX M g)z%Remove keys other than ''.Nrr2r3)r4r5r6)rGr5r;s r(r"ModifiedInterpreter.checklinecaches7;C2AwRS!T)Jr0cURR(aUR5 gUR(a URR SSU405 g[ XR 5 g)z*Run the code without invoking the debuggerrrerr)r rZdisplay_executing_dialogr?rrer )rGrs r(r}ModifiedInterpreter.runcommandsW >> # #  ) ) + ;; KK # #FIw C {{ #r0cURR(aUR5 UR5 URnURR 5 U(d2UR b%UR RSSU405UlO:U(aUR"XR5 O[XR5 [$(dURR+5 gg![a` URR(dC[R"SSSURR S9(aeUR#5 Ne [$(aJ['SURR(S 9 UR#5 URR+5 NURR,(a2S URl['S URR(S 9 GN4UR#5 GNG=f![.a gf=f![$(d,URR+5 f![.a ff=ff=f) Override base class methodNrerzExit?zDo you want to exit altogether?yesr)rz IDLE internal error in runcode()rFr)r rZrbrrbeginexecutingr? asyncqueuerrunr re SystemExitrr askyesnorLrrrr9rcanceledr")rGrrs r(rModifiedInterpreter.runcodes >> # #  # # % ==&  NN ) ) + 7"&++"8"89=#E T;;/T;;'4">NN//1"3 >>))&&5!>>.. 0 &&( )~8>>002""$++->>**.3DNN+-DNN4I4IJ&&( &">NN//1%"s AC>H0#C>?H0C>H0"H >A&H$H0&AH;H0=A HH0 HH0 H-,H-0 I)=II) I%"I)$I%%I)cLURRRU5$)r)r r9r!)rGr0s r(r!ModifiedInterpreter.write*s~~$$**1--r0cX[R"SSURRS9 g)NzPort Binding ErroraAIDLE can't bind to a TCP/IP port, which is necessary to communicate with its Python execution server. This might be because no networking is installed on this computer. Run IDLE with the -n command line switch to start without a subprocess and refer to Help/IDLE Help 'Running without a subprocess' for further details.rr rr rLrs r(r@.ModifiedInterpreter.display_port_binding_error.s'  / >>&& (r0cX[R"SSURRS9 g)NzSubprocess Connection ErrorzIDLE's subprocess didn't make connection. See the 'Startup failure' section of the IDLE doc, online at https://docs.python.org/3/library/idle.html#startup-failurerrrs r(rJ/ModifiedInterpreter.display_no_subprocess_error9s( ) J>>&&  (r0cX[R"SSURRS9 g)NzAlready executingzYThe Python Shell window is already executing a command; please wait until it is finished.rrrs r(r,ModifiedInterpreter.display_executing_dialogAs%  0>>&&  (r0) rsrrrrrrr?r"rr )Fre)FrD)(rrrrrKrsr?r"r#rrPrbrnrprurYrLrrMrrrVrrrrrrrrrrrr}rr!r@rJrrrr0r(r r sCH FJM F)V*XGB   J$CLH! " C( (H $4/ ,\. (((r0r c t^\rSrSrSSKJr S\"5-r\r \ r /SQr \ RS/-rS\"\"\R$"S\555-r\R)\S 5 CS rS rSS KJr SS KJr S;SjrU4SjrU4SjrSrSrSr S;Sjr!S r"S r#S r$S r%S r&S r'Sr(Sr)S;Sjr*Sr+S;Sjr,Sr-Sr.Sr/Sr0Sr1Sr2S r3S!r4S"r5S#r6S$r7S%r8S&r9S'r:S;S(jr;S)rS,r?\@R"S-5rBS.rCS;S/jrDS;S0jrES;S1jrFS2rGS3rHS4rIS>rcUSS:g$)Nrr_r) rmenu_items r(rPyShell.as :a=F2r0)zCopy with prompts<>r`Fr)History) ShellSidebarc[(a*URnUSSS:waURSS5 [U5UlUc0[ 5n[ U5 UR5 [U5nSUl [R"XSS5 SUl SUl [[S5(a[R OSUlUR"R%S 5S UlUR"UlUR*nUR-S S 9 UR/S UR05 UR/SUR25 UR/SUR45 UR/SUR65 UR/SUR85 UR/SUR:5 UR/SUR<5 UR/SUR>5 [(a8UR/SUR@5 UR/SURB5 UREU5Ul#UR/SURH5 [RJUl&[RNUl([RRUl*SSK+J,n [[USUR\UR^5Ul)[aUSUR\UR^5Ul%[aUSUR\S5Ul'[aUSUR\UR^5Ul1[(d?URJ[l%URN[l'URR[l)SSK2nURfUl4URmUR*5Ul7SUl8URsU5Ul URtRvRUR*lURtRy[{55 g! [Rj[l'e=f)Nrrshell)rShe_llFps1z>>> rr2char)wrapz<>z<>z<>z<>z<><>rrz<>z<>r )iomenurr8r9backslashreplacer72)>r menu_specsr{r rvTkrwithdrawr shell_sidebarrrKusetabs indentwidthhasattrr rsys_ps1rprompt_last_linepromptrL configurerMenter_callbacklinefeed_callbackcancel_callback eof_callbackrtoggle_debuggertoggle_jit_stack_viewercopy_with_prompts_callbackview_restart_mark restart_shellrsqueezersqueeze_current_text_eventr8 save_stdoutr9 save_stderrr save_stdinrrrencodingerrorsrr7pydoc plainpagerpagerrrhistoryrrperr insertfilterr)rGrPmsrrLrr9s r(rKPyShell.__init__os1 >B!uQx7" !01)$/ =4D $  MMO#D)E!d46 ")#u"5"5sww7 $ 2 24 8 <ll yy F# *D,?,?@ 0$2H2HI +T-A-AB #T%6%67 )4+A+AB ')=)=> /1M1MN )4+J+JK > II($*@*@ A II)4+=+= > d+  ,11 3::::))"!$"(//6==B #D($*OOV]]D #D($*OO5GI $T9%+__fmmE ~CJCJ CI  **EK ||DII. !..t4  88<<..  79: CJ s P==Qcr>[TU]5 URbURR5 ggrD)r ResetFontr! update_fontrGrs r(rBPyShell.ResetFonts1     )    * * , *r0c>[TU]5 [R"5nSSS.[R"US5[R"US5[R"US5S.nUR 5H"up4UR R"U40UD6 M$ URbURR5 gg)N)rgrfr8r9r)rr8r9r7) rResetColorizerrrirjitemsrL tag_configurer! update_colors)rGrm tag_colorsrtag_colors_configrs r(rGPyShell.ResetColorizers  %%'"&d;))%:))%:**5(;  '1&6&6&8 "C II # #C =+< ='9    )    , , . *r0cB[R"URSS9 g)Nr) insert_tagsrd)rrLrs r( replace_eventPyShell.replace_events w7r0c*[R"SS9$)NT) shell_only)r GetExtensionsrs r(get_standard_extension_names$PyShell.get_standard_extension_namess%%66r0cpURRX5n[[[ U55[[ U555nUVs/sH(nUR R RU5PM* nnSRS[XcR5555S-$s snf)z6Return text between first and last with prompts added.rc3># UHupUcUOUSU3v M g7f)N r).0r'rs r( *PyShell.get_prompt_text..s- ? ND6(!D6(: : ?s) rLgetrr}r~r! line_promptsrTzip splitlines)rGfirstlastrL lineno_ranger'promptss r(get_prompt_textPyShell.get_prompt_textsyy}}U) e  d  ' &    + + / / 7&  yy #G__-> ?      s/B3cURnURS5nUcgURS5nUSS:waURS5nUR5 URX45nUR U5 g)zCopy selected lines to the clipboard, with prompts. This makes the copied text useful for doc-tests and interactive shell code examples. This always copies entire lines, even if only part of the first and/or last lines is selected. zsel.first linestartNsel.lastr20zsel.last+1line linestart)rLrrclipboard_clearreclipboard_append)rGrrLselfirstsellast prompt_texts r(r/"PyShell.copy_with_prompts_callbacksxyy::34   **Z( 2;# jj!;>  !2<yy "  ' ' )((*B##%""$r0cdURR5nURSU(5 g)Nr)rvrVsetvarrGr|s r(ryPyShell.set_debugger_indicators% [[ $ $ & )2v6r0cgrDrrs r(r.PyShell.toggle_jit_stack_viewers r0cURR5nU(aURRS5 UR5 URR(a*[ R "URR5 UR5 URRS5 URUl UR5 UR5 g)Nz [DEBUG OFF] )rvrVrrXr?rclose_remote_debuggerrr7r!r%r'r^ryrs r(rzPyShell.close_debugger"s [[ $ $ & KK # #D ) HHJ{{!!001C1CD     LL   /,,DK OO  ##%r0c|URR(a,[R"URRU5nO[R "U5nURR U5 UR5 SUR-Ul UR5 UR5 g)Nz [DEBUG ON] ) rvr?rstart_remote_debuggerrDebuggerrr`r%r'r^ry)rGdbg_guis r(r{PyShell.open_debugger/s ;;   66t{{7I7I;?AG''-G (  "$t||3   ##%r0cTUR(aSOSnURSSU5 g)Ndisabledrrxz *tack*iewer)rZupdate_menu_state)rGstates r(debug_menu_postcommandPyShell.debug_menu_postcommand;s!"nn ( w u=r0c2UR5 SUlg)Helper for ModifiedInterpreterTN)rrZrs r(rPyShell.beginexecuting?s r0c@SUlSUlUR5 g)rFN)rZrr^rs r(rPyShell.endexecutingDs  r0cUR(a'[R"SSSURS9nUSLagUR 5 SUlSUl[R"U5$)zExtend EditorWindow.close()zKill?z7Your program is still running! Do you want to kill it?okrFcancelT) rZr askokcancelrLr[rrrrX)rGrs r(rX PyShell.closeJsa >>!--Jyy "H 5    !!$''r0cdUR5 [(aURR5 UR[ lUR[ lUR[ l SUlSUl SURl SUl[R "U5 g)zEExtend EditorWindow._close(), shut down debugger and execution serverN)rzrrvrur4r r8r5r9r6rr7rPrur<rrrs r(rPyShell._closeYsw  > KK ' ' )%% %% OO   !  D!r0cg)z8Override EditorWindow method: never remove the colorizerTrrs r(ispythonsourcePyShell.ispythonsourceisr0cUR$rD) shell_titlers r( short_titlePyShell.short_titlemsr0z>Enter "help" below or click "Help" above for more information.c URRSS5 UR5 [(a5SnURR 5nU(dUR 5 gOSn[R[lURS[R<S[R<SUR<SU<35 URR5 UR5 S SKnS UlSUlg ) Nrr{reFz==== No Subprocess ==== WARNING: Running IDLE without a Subprocess is deprecated and will be removed in a later version. See Help/IDLE Help for details. zPython z on rrT)rLr\rrrvrPrXr displayhookr r!versionplatform SPLASHLINE focus_forcer^tkinter_support_default_root _default_root)rGnosubclientrs r(r PyShell.beginrs 8X.  >E[[113F 'E"ooCO KKtG H  (,% $r0cjUR(dgSUlURR5 gNT)reading_stop_readline_flagrquitrs r(r[PyShell.stop_readlines!|| #'   r0cURnSUlURR5 XlUR(aSUlgURR SS5n[ U5S:XaSnUR5 UR(aSUl[(d[eUR(a SUl SnU$!Xlf=f)NTFrerrSrr) rrmainlooprrLr]rrrrr endoffile)rGr:rs r(readlinePyShell.readlines|| DL HH   L  # #',D $yy}}Xx0 t9>D  ==!DM!>'' >>"DND  Ls !CCcgrrrs r(isattyPyShell.isattysr0cURRSSS5(agUR(dMUR(d<UR 5 UR R S5 UR5 gSUlSUl UR(aoUR R(aTUR R5(aUR R5 OUR R5 UR(aURR5 g! GN=f)N sel.firstz!=rhzKeyboardInterrupt rdFT)rLrrZrrrvr!r^rrr?rVrbrprrrs r(r+PyShell.cancel_callbacks yy  dJ??@$,,     KK  3 4 OO  NNt{{11{{&&(( ..0 002 << HHMMO!  s "D>>EcUR(aUR(dgURRSSS5(a"URRSSS5(dgUR(d!UR 5 UR 5 gSUlSUlURR5 g)Nrz==r{rSFTrd) rZrrLrrrXrrrrrs r(r,PyShell.eof_callbacks >>$,,  !!(D(;; !!(D(;; ~~     JJL "DM!DN HHMMOr0cUR(a8URRSS5 URRS5 gUR U5 g)Nr{rrd)rrLr{seenewline_and_indent_eventrs r(r*PyShell.linefeed_callbacksE << II  Xt , IIMM( #  ) )% 0r0cZ UR(aUR(dgURRSS5nU(a4URR SSS5(aUR X!5 gURR SSS5(GaURR S S5nU(Ga>URR SSUS 5(GaS URRS5;aURR S S5nU(a2URR US S US 5(a US US 4nURRS S5nU(aNURR US SUS 5(a&US URRUS S-54nUR URRUS US 5U5 gURRS S5nU(aURR SS US 5(aURRS S5nU(aNURR US SUS 5(a&US URRUS S-54nUR URRUS US 5U5 gURRS S5nU(aUURR US SS5(a0UR URRUS S5U5 gUR URRSS5U5 gURR SSS5(aURRSS5 URRSS5nU(a1UR5(dURRSS5 URR SSS5(aURU5 gURRSS5 UR(a8URRSS5 URRS5 OURU5 URR!5 UR(aUR"R%5 gUR'5 g! GN=f)Nrrhz<=rrdr{riomark linestartrrr7z>=rz+1czinsert lineendrrSzend-1c linestartr)rZrrLr]rrecall tag_prevrange tag_names tag_nextrangerrr\striprrr{rupdate_idletasksrrrunit) rGrselprev prev_cons next_consnextindicesr0s r(r)PyShell.enter_callbacks >>$,,  ))-- Z8C99$$Zx@@KK+" 99  Xs,> ? ? 99**7H=DII%%hT!W==TYY%8%8%BB II33IxH !2!29Q<tAw!O!O%aL$q'2D II33IxH !2!29Q<d1g!N!N GTYY__Yq\E5I%JKD DIIMM$q'47;UC99**7H=D ))*:D$q'JJ II33I?OP !2!29Q<d1g!N!N GTYY__Yq\E5I%JKD DIIMM$q'47;UCii--i9KLGyy  T3EFF DIIMM'!*6FGO DIIMM*<>NOQVW 99  XsH 5 5 II  x 2 IIMM(H - QWWYY II  Xx 0 99  Xs,> ? ?  ) )% 0 8X. << II  Xt , IIMM( #  ) )% 0 ""$ << HHMMO JJLE  s AT%%T*c[R"SSU5n[R"SSU5nURS5nURR 5 URR SSS5 URR SS 5 URRS S5nUR5RS 5(a-URU5 URRS S5nURRSUS R5UR5 [U5S :a[R"SUS 5R!S 5n[R"SU5R!S 5nUS SHanUR#U5(aXg[U5S-nURRSSUR5-UR5 Mc URR%S5 URR'5 g!URR%S5 URR'5 f=f)Nz^\s*\nrez\n\s*$rrrrr{rSr:rrz ^([ \t]*))resubrrLundo_block_startrr\r]rstripendswithrr{ruser_input_insert_tagsrsearchgrouprrundo_block_stop)rGr0rrprefixorig_base_indentnew_base_indentrs r(rPyShell.recall)s FF9b! $ FF9b! $  ""$ ( II u 5 II  x 2YY]]#5x@F}}'',,--e4'98D II  XuQx~~'7!88 :5zA~#%99\58#D#J#J1#M #%99\6#B#H#H#K!!"ID'788.c:J6K6L1MMII$$Xtdkkm/C%)%@%@B & IIMM( # II % % ' IIMM( # II % % 's F&H997I0z[ \t]*(\n[ \t]*)?\ZcURRS5nURRSS5nURR SU5nUR R U5nU(d`URRU5S:Xa&URRURU5 URR5 gg)Nend-2crrSrer) rLrrr]_last_newline_rerrvrrrr!update_sidebar)rG index_beforerinput_is_completes r(r PyShell.runitFsyyx0 yy}}Xx0$$((T2 KK11$7 yy}}\*d2 $$T%@%@,O    - - /!r0c"URR(aURR5$SSKJn U"UR [ RUR5 g! [R"SSURS9 g=f)Nr) StackBrowserzNo stack tracez:There is no stack trace yet. (sys.last_exc is not defined)r) rvr?ridlelib.stackviewerrrr last_excrPr rrL)rGrrs r(rPyShell.open_stack_viewerRsp ;;  ;;224 44 " CLL$** =   "  !10yy "s ,A**"BcpURRS5 URRS5 g)NrrT)rLrrs r(r0PyShell.view_restart_mark`s" h i r0c6URRSS9 g)z&Callback for Run/Restart Shell Cntl-F6Tr:N)rvrbrs r(r1PyShell.restart_shellds &&&5r0cUR5 URnUR(a9URUR5(aUS[ UR5*nUR R SS5 URRU5 URR5 UR RSS5 UR5 URR5 g)Nr7z iomark-1cr{rS)rr'r%rrrLrqr7r!r!rr\set_line_and_columnrW reset_undo)rGr's r(r^PyShell.showprompths  <''   s AA==Bc>URRSSS5(ag[TU]5$![a gf=f)Nrrrr)rLrrrr^rDs r(r^PyShell.rmenu_check_cutsM yy  c8<<!=w&((  s"5 AAcf>URRSSS5(ag[TU] 5$)Nr{rrr)rLrrrbrDs r(rbPyShell.rmenu_check_pastes- 99  Xc( 3 3w(**r0clURR5 URR5 grD)r2squeeze_current_textr!rrs r(r3"PyShell.squeeze_current_text_events$ **, ))+r0c8URR5 grD)r!r)rGrrrLrs r(on_squeezed_expandPyShell.on_squeezed_expands ))+r0)rrrr7rrZr<r#rvrr'r&rr5r6r4r!r2r9rr8r%r"rD)r)Qrrrridlelib.squeezerrr rrrrrrrrrr6 itertools takewhile_idxr{allow_line_numbersridlelib.historyridlelib.sidebarrrKrBrGrPrUrer/rrZrrrrrsrvr-ryr.rzr{rrrrXrrrrrr[rrr+r,r*r)rrrrrrr0r1r^rrr!r^rbr3rrrrs@r(rrIs)."22K,N)MJ**/.K s4 ++2KA Dt23 $(,L;\- / 7"+(GIHIG  %7  & &>  ("  RJ4 ., M^(8zz"89 0 !6 J* )+ ,,,r0rc URS:Xa0SH)nURUSSURUS5-5 M+ gg)z6Make paste replace selection on x11. See issue #5124.x11)TextEntrySpinboxz <>z%catch {%W delete sel.first sel.last} N)_windowingsystem bind_class)rclss r( fix_x11_paster&sG %-C OO8[9: ;.&r0a USAGE: idle [-deins] [-t title] [file]* idle [-dns] [-t title] (-c cmd | -r file) [arg]* idle [-dns] [-t title] - [arg]* -h print this help message and exit -n run IDLE without a subprocess (DEPRECATED, see Help/IDLE Help for details) The following options will override the IDLE 'settings' configuration: -e open an edit window -i open a shell window The following options imply -i and will open a shell: -c cmd run the command in a shell, or -r file run script from file -d enable the debugger -s run $IDLESTARTUP or $PYTHONSTARTUP before anything else -t title set title of shell window A default edit window will be bypassed when -c, -r, or - are used. [arg]* are passed to the command (-c) or script (-r) in sys.argv[1:]. Examples: idle Open an edit window or shell depending on IDLE's configuration. idle foo.py foobar.py Edit the files, also open a shell if configured to start with shell. idle -est "Baz" foo.py Run $IDLESTARTUP or $PYTHONSTARTUP, edit foo.py, and open a shell window with the title "Baz". idle -c "import sys; print(sys.argv)" "foo" Open a shell window and run the command, passing "-c" in sys.argv[0] and "foo" in sys.argv[1]. idle -d -s -r foo.py "Hello World" Open a shell window, run a startup script, enable the debugger, and run foo.py, passing "foo.py" in sys.argv[0] and "Hello World" in sys.argv[1]. echo "import sys; print(sys.argv)" | idle - "foobar" Open a shell window, run the script piped in, passing '' in sys.argv[0] and "foobar" in sys.argv[1]. c 6SSKnSSKJn SSKJn SSKJn [ S5 SqSnSnSnSnSnSn UR[RSSS5upW HupU S :XaUnSnU S:XaSnSnU S:XaSnU S:Xa8[RR![5 [R"5 U S:XaSnU S:Xa[S[RS 9 SqU S:XaJUn["R$R'U5(aO![SU5 [R"5 SnU S:XaSn SnU S:XdMU[(lSnM W (a)U SS:Xa [R,R/5nSn[1[3[R$55HDn["R$R5[R$U5[R$U'MF U (aU SS:XaS/U SS-[l GOU(aS /U -[l GOU(aU/U -[l OU (aSn/nU H1nUR7["R$R9U55 M3 UHXn["R$R5U5nU[R$;dM8[R$R;SU5 MZ OI["R<"5nU[R$;a [R$R;SU5 [>R@"SSSSS9nU=(d UnU=(d U(+n[(aU(d [C5 [ESS 9q#[FRI5 SS!K%J&n U"[F5 ["R$RO["R$R9[P5S"5nU"5S#:Xa4["R$ROUS$5n[FRSUS%9 OURU5(d}[VS&:aS'nS(nOS)nS*nUVs/sH(n["R$ROUS+UU4-5PM* nnUVs/sHn[Y[FUS,9PM nn[FRZ"S/UQ76 [][F5 [_[F5 [a[F5q1URe[F[b5 U(a^U(dWU(dPU SSH,n[bRgU5bMU RiU5 M. U (d[bRk5 U(aa[bRm5nU(dgURU5(a/[bRn(aURpRs5 O[bRtnU(aURw5 U (a["RxR{S-5=(d ["RxR{S.5nU(a?["R$R'U5(aUR|RU5 U(dU(aUR|RS/R[R55 U(aUR|RU5 OmU(a6UR|RU5 UR|RU5 O/U(a(UR5nU(aURU5 [bR(a+[FR5 [bR(aM+[FR5 [ S5 g!URaCn [S U S [3[RS 9 [R"S 5 Sn A GNSn A ff=fs snfs snf)0Nr)system)testing)macosxTFrz c:deihnr:st:zError: rrrr,z-dz-ez-hz-iz-nz: Warning: running IDLE without a subprocess is deprecated.z-rzNo script file: z-sz-t-rer&r'zeditor-on-startupr()r*Idle) className) fix_scalingIconsWindowszidle.ico)r)g333333!@z.png) 0z.gif)r1r2r3z idle_%d%s)masterr IDLESTARTUP PYTHONSTARTUPzdif 1: import sys as _sys _sys.argv = {!r} del _sys )Igetoptrr(rr)r*r/rr argverrorr usage_msgr9exitr8r!rRrSrrrrrrrrrtdirnamer{getcwdrr. NoDefaultRootrrr  idlelib.runr.rT__file__ wm_iconbitmapisAquaTk TkVersion PhotoImage wm_iconphotorr&rrPsetupApprrnewrQrrlowerrur{rr]rvrr}r~rrpreferTabsPreferenceWarningr inversedictrdestroy)r8r(r)r* enable_shell enable_editrxcmdscriptstartupoptsr[roarOpathxr&dir edit_startr.icondiriconfileextsizessize iconfilesiconsrprefer_tabs_preference_warnings r(r&r&sTNLK E C FG]]388AB<@  9CL 9EL 9K 9 JJ  Y ' HHJ 9L 9 Nzz #"N 9Fww~~f%%(&1 L 9GL 9"#G L?@ Q3iinn 3sxx= !ggoochhqk2 " Q34$qr(? 6D= 8d?  H LL2 3C''//#&C#((?3' iik chh  HHOOAs ###FI$7fFJ+K2{?L~g  DMMO'ggll277??84g>G x977<<4 8, __    C%EC E!&(!&WW\\';$+DE!& ("+,!*X4h7!* , $''$$ D !E OOD% v G::h'/KK)$   "  ??   IIOO    ::>>-03::>>/2  x00 LL ! !( + f !&"  $  LL # #C (  LL ( ( 0 LL ! !& ) *0)K)K)M& )   = >        LLNUy << uByk*<  n(,s#%^;/``;` 8`  `)NN)Nr rrr ImportErrorrrrr idlelib.utilr r rr rr4rRos.pathr rrDr textwrapr rlr=rr,idlelib.colorizerridlelib.configridlelib.delegatorrrrridlelib.editorrridlelib.filelistridlelib.outwinrrrr@rrr idlelib.undorrr<reofr<r NameErrorr r)r+r/ checkcacher<r>rrrr RPCClientrrr rr&r;r&rr0r(ros  z%([[%B " )+/2;2F2F(5 {",{"|h( 2^ 2/M/D1 1#-- m(0m(` _ ,l_ ,D;4  lnb zFo4  9?B~~O Q-b  sF-#G- G GG