+
     Bi                        ^ RI t ]R8X  d!   ] P                  R,          ] P                  R&    ^ RI5 ] P                  R8X  d   ^ RI	H
t
 ]
! 4        ^ R	IHt ^ R
IHt ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIt^ RIt^ RIt^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI H!t! ^ RI"H#t# ^ RI"H$t$ ^ RI%H&t&H't' ^ RI(H)t) ^ RI*H+t+ ^ RI"H,t, ^ RI"H-t- ^ RI.H/t/H0t0H1t1 ^ RI2H3t3 Rs4Rt5^ t6 Rt7]7]8n7        ]7]9n7        ] P                  s;R4R lt<Rs=R t>]>! R4       R]P~                  3R lt@]@]n?         ! R  R!]&4      tA ! R" R#])4      tB ! R$ R%]4      tC ! R& R']34      tD ! R( R)]!4      tE ! R* R+]-P                  4      tGR, tH ! R- R.]4      tI ! R/ R0]+4      tJR1 tKR2tLR3 tM]R8X  d   ]M! 4        ]>! R4       R#   ] d    ]! R] P                  R7       ]! ^4      hi ; i  ]: d     Li ; i)5    N__main__zidlelib.pyshell)*zJ** IDLE can't import Tkinter.
Your Python may not be configured for Tk. **filewin32)fix_win_hidpi)
messagebox)InteractiveInterpreter)python_version)TextWrapper)ColorDelegator)idleConf)	Delegatordebugger)
debugger_r)EditorWindowfixwordbreaks)FileList)OutputWindow)replace)rpc)idle_formatwarningStdInputFileStdOutputFile)UndoDelegatorFz	127.0.0.1zCtrl-D (end-of-file)c           
         Vf   \         p VP                  \        WW#VR7      4       VP                  R4       R#   \        \        3 d     R# i ; i)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_streamwriter   AttributeErrorOSError)messagecategoryfilenamelinenor   r   s   &&&&&&&/usr/lib/python3.14/idlelib/pyshell.pyidle_showwarningr(   C   sS     |

%8$@ 	A

6G$ s   .< AAc                    V '       d,   \         f"   \        P                  s \        \        n        R# R# \         e   \         \        n        Rs R# R# )z>Replace warning.showwarning with idle_showwarning, or reverse.N)_warnings_showwarningwarningsshowwarningr(   )captures   &r'   capture_warningsr.   V   sA      ($,$8$8!#3H  ) !,#8H $(! -    Tc                    \         P                  p/ p\        V4       F0  pVR,          VRR ,           R8X  g   K  VP                  V4      W4&   K2  	  V! V 4       VP	                  V4       R# )aW  Extend linecache.checkcache to preserve the <pyshell#...> entries

Rather than repeating the linecache code, patch it to save the
<pyshell#...> 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.
N   NN<>)	linecachecachelistpopupdate)r%   orig_checkcacher6   savekeys   &&   r'   extended_linecache_checkcacher=   e   s\     OOEDE{r7SX%		#DI  H	LLr/   c                   z   a  ] tR t^|t o RtR t. ROtRR ltR tRR lt	RR lt
R tR	 tR
 tR tR tR tRtV tR# )PyShellEditorWindowz6Regular text edit window in IDLE, supports breakpointsc                   . V n         \        P                  ! V .VO5!   V P                  P	                  R V P
                  4       V P                  P	                  RV P                  4       V P                  P	                  RV P                  P                  4       \        P                  P                  \        P                  R4      V n        V P                  P                   V 3R lpV P                  P#                  V4       V P                  P$                  '       d   V P'                  4        V P)                  4        R# )<<set-breakpoint>><<clear-breakpoint>>z<<open-python-shell>>zbreakpoints.lstc                 4    VP                  4        V ! 4        R # N)restore_file_breaks)old_hookselfs   &&r'   filename_changed_hook;PyShellEditorWindow.__init__.<locals>.filename_changed_hook   s    $$&Jr/   N)breakpointsr   __init__textbindset_breakpoint_eventclear_breakpoint_eventflist
open_shellospathjoinr   userdirbreakpointPathiofilename_change_hookset_filename_change_hookr%   rE   color_breakpoint_text)rG   argsrH   s   &* r'   rK   PyShellEditorWindow.__init__   s    d*T*		+T-F-FG		-t/J/JK		.

0E0EF !ggll  "35 ,077+G+G'+	 	(()>?77$$&""$r/   Nc                    V P                   f   R# V'       d.   \        P                  ! 4       p\        P                  ! VR4      pMRRRR/pV P                  P                  RV4       R# )z,Turn colorizing of breakpoint text on or offNbreak
foreground 
backgroundBREAK)rW   r   CurrentThemeGetHighlightrL   
tag_config)rG   colorthemecfgs   &&  r'   rZ   )PyShellEditorWindow.color_breakpoint_text   sS    77?))+E''w7C\26C		Wc*r/   c                   V P                   pV P                  P                  pVP                  R RV,          RV^,           ,          4        V P                  P                  V4        V P                  P                  P                  P                  pVP                  W14       R#   \         d    T P                  P                  T4        Lfi ; i    R# ; i)rb   z%d.0N)rL   rW   r%   tag_addrJ   index
ValueErrorappendrP   pyshellinterpr   set_breakpoint)rG   r&   rL   r%   debugs   &&   r'   rq   "PyShellEditorWindow.set_breakpoint   s    yy77##Wfvov/BC	,""6*	JJ&&--66E  2	  	,##F+	,
	s   B% (;C %&CCCc                    V P                   pV P                  P                  pV'       g   VP                  4        R # \	        \        VP                  R4      4      4      pV P                  V4       R # )Ninsert)rL   rW   r%   bellintfloatrl   rq   )rG   eventrL   r%   r&   s   &&   r'   rN   (PyShellEditorWindow.set_breakpoint_event   sO    yy77##IIKU4::h/01F#r/   c                   V P                   pV P                  P                  pV'       g   VP                  4        R # \	        \        VP                  R4      4      4      p V P                  P                  V4       TP                  RRR4        T P                  P                  P                  P                  pTP                  Y44       R #     LU; i    R # ; i)Nru   rb   insert linestartzinsert lineend +1char)rL   rW   r%   rv   rw   rx   rl   rJ   remove
tag_removerP   ro   rp   r   clear_breakpoint)rG   ry   rL   r%   r&   rr   s   &&    r'   rO   *PyShellEditorWindow.clear_breakpoint_event   s    yy77##IIKU4::h/01	##F+ 	!3/	1	JJ&&--66E""84		s   !C ;C CCc                j   V P                   '       d   V P                  pV P                  P                  pV'       g   VP	                  4        R # . V n         VP                  RR\        4        V P                  P                  P                  P                  pVP                  V4       R # R #     R # ; i)Nrb   1.0)rJ   rL   rW   r%   rv   r~   ENDrP   ro   rp   r   clear_file_breaks)rG   rL   r%   rr   s   &   r'   r   %PyShellEditorWindow.clear_file_breaks   s    99Dww''H		!DOOGUC0

**11::''1 s   .;B- -B2c                   V P                   pV P                  P                  p \        V P                  4      ;_uu_ 4       pVP                  4       pRRR4        \        T P                  R4      ;_uu_ 4       pX F4  pTP                  TR,           4      '       d   K#  TP                  T4       K6  	  T P                  4        T P                   pT'       d0   TP                  TR,           \        T4      ,           R,           4       RRR4       R#   + '       g   i     L; i  \         d    . p Li ; i  + '       g   i     R# ; i  \         ds   p\        T P                  RR4      '       gK   RT P                  n        \        P                  ! RR	\        T4      ,          T P                   R
7        Rp?R#  Rp?R# Rp?ii ; i)z#Save breakpoints when file is savedNw=
breakpoint_error_displayedFTz
IDLE Errorz$Unable to update breakpoint list:
%s)titler#   parent)rJ   rW   r%   openrV   	readlinesr"   
startswithr    update_breakpointsstrgetattrrootr   r	   	showerrorrL   )rG   breaksr%   fplinesnew_filer   errs   &       r'   store_file_breaks%PyShellEditorWindow.store_file_breaks   sU   $ !!77##	d))**b +	&d))3//8!D??8c>:: t, " '')))NN8c>CK#?$#FG 0/ +* 	E	 0//  	&499&BEJJ7;		4$$<Cc(#99& & K	&sr   D$ DD$ E 9!D78D7/D7E D!	D$ !D$ $D43D47E	E E GA!GGc                H   V P                   P                  4        V P                  f   R # V P                  P                  pVf   R # \        P
                  P                  V P                  4      '       d   \        V P                  4      ;_uu_ 4       pVP                  4       pR R R 4       X F[  pVP                  VR,           4      '       g   K#  \        V\        V4      ^,           R  4      pV F  pV P                  V4       K  	  K]  	  R # R #   + '       g   i     Lu; i)Nr   )rL   r9   rW   r%   rR   rS   isfilerV   r   r   r   evallenrq   )rG   r%   r   r   r   breakpoint_linenumbersbreakpoint_linenumbers   &      r'   rE   'PyShellEditorWindow.restore_file_breaks  s    		77?77##77>>$--..d))**b +??8c>22-1$s8}Q7G2H-I*1G-++,AB 2H  /**s   DD!	c                n    V P                   pVP                  R4      pV P                  V4      pW0n        R# )z3Retrieves all the breakpoints in the current windowrb   N)rL   
tag_rangesranges_to_linenumbersrJ   )rG   rL   rangeslinenumber_lists   &   r'   r   &PyShellEditorWindow.update_breakpoints  s/    yy)44V<*r/   c                &   . p\        ^ \        V4      ^4       Ft  p\        \        W,          P                  4      4      p\        \        W^,           ,          P                  4      4      pWE8  g   KZ  VP                  V4       V^,          pK$  	  V# )r   )ranger   rw   rx   stringrn   )rG   r   r   rl   r&   ends   &&    r'   r   )PyShellEditorWindow.ranges_to_linenumbers#  sq    1c&k1-Ev}3345FeF7O2234C,V$! . r/   c                R    V P                  4        \        P                  ! V 4       R# )z7Extend base method - clear breaks when module is closedN)r   r   _closerG   s   &r'   r   PyShellEditorWindow._close4  s     D!r/   )rV   rJ   ))Cutz<<cut>>rmenu_check_cut)Copyz<<copy>>rmenu_check_copy)Pastez	<<paste>>rmenu_check_paste)NNN)zSet BreakpointrA   N)zClear BreakpointrB   NTrD   )__name__
__module____qualname____firstlineno____doc__rK   rmenu_specsrZ   rq   rN   rO   r   r   rE   r   r   r   __static_attributes____classdictcell____classdict__s   @r'   r?   r?   |   sM     <%(K
+$&(&TC"+"" "r/   r?   c                   6   a  ] tR tRt o Rt]tRtRR ltRt	V t
R# )PyShellFileListi:  z8Extend base class: IDLE supports a shell and breakpointsNc                &   V P                   '       d1   V P                   P                  P                  4        V P                   # \        V 4      V n         V P                   '       d#   V P                   P	                  4       '       g   R # V P                   # rD   )ro   topwakeupPyShellbeginrG   ry   s   &&r'   rQ   PyShellFileList.open_shellC  sc    <<<LL##% ||	 #4=DL|||||))++||r/   )ro   rD   )r   r   r   r   r   r?   r   ro   rQ   r   r   r   s   @r'   r   r   :  s     > 'LG r/   r   c                   0   a  ] tR tRt o RtR tR tRtV tR# )ModifiedColorDelegatoriN  z8Extend base class: colorizer for the shell window itselfc                ~    V P                  R RR4       V P                  RRR4       \        P                  ! V 4       R# )TODOr   iomarkSYNCN)r~   rk   r   recolorize_mainr   s   &r'   r   &ModifiedColorDelegator.recolorize_mainP  s0    x0VUH-&&t,r/   c                R    V P                    F  pV P                  VR R4       K  	  R# )r   r   N)tagdefsr~   )rG   tags   & r'   removecolors#ModifiedColorDelegator.removecolorsU  s     <<COOC51  r/    N)	r   r   r   r   r   r   r   r   r   r   s   @r'   r   r   N  s     >-
2 2r/   r   c                   J   a a ] tR tRt oRtRR ltRR ltV 3R ltRtVt	V ;t
# )ModifiedUndoDelegatori[  z;Extend base class: forbid insert/delete before the I/O markc                     V P                   P                  VR R4      '       d   V P                   P                  4        R#  \        P
                  ! WW#4       R#   \         d     L&i ; i<r   N)delegatecomparerv   TclErrorr   ru   rG   rl   charstagss   &&&&r'   ru   ModifiedUndoDelegator.insert]  s^    	}}$$UC::""$ ;
 	T%6  		   "A A A)(A)c                     V P                   P                  VR R4      '       d   V P                   P                  4        R#  \        P
                  ! WV4       R#   \         d     L&i ; ir   )r   r   rv   r   r   delete)rG   index1index2s   &&&r'   r   ModifiedUndoDelegator.deletef  s^    	}}$$VS(;;""$ <
 	T62  		r   c                   <a V P                   P                  oV3R  lV P                   n         \        SV `  V4       SV P                   n        R#   ST P                   n        i ; i)c                    < S! WR 4      # )stdinr   )rl   r   orig_inserts   &&r'   <lambda>2ModifiedUndoDelegator.undo_event.<locals>.<lambda>v  s    U7!Cr/   N)r   ru   super
undo_event)rG   ry   r   	__class__s   &&@r'   r    ModifiedUndoDelegator.undo_evento  sN    
 mm**C 		/Gu%#.DMM ;DMM s   A A$r   rD   )r   r   r   r   r   ru   r   r   r   r   __classcell__r   r   s   @@r'   r   r   [  s     A73/ /r/   r   c                   .   a  ] tR tRt o RtRR ltRtV tR# )UserInputTaggingDelegatori}  z.Delegator used to tag user input with "stdin".Nc                J    Vf   RpV P                   P                  WV4       R # )Nr   )r   ru   r   s   &&&&r'   ru    UserInputTaggingDelegator.insert  s     <DU40r/   r   rD   )r   r   r   r   r   ru   r   r   r   s   @r'   r   r   }  s     81 1r/   r   c                   &   a  ] tR tRt o R tRtV tR# )MyRPCClienti  c                    \         h)z0Override the base class - just re-raise EOFError)EOFErrorr   s   &r'   
handle_EOFMyRPCClient.handle_EOF  s    r/   r   N)r   r   r   r   r   r   r   r   s   @r'   r   r     s      r/   r   c                    RT;'       g    R R2pV \        V4      8  d;   \        V \        V4      ,
          ^4      w  r4W4,           R,           V VR,           2# VRR # )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 =r   N)r   divmod)widthr%   r   divmods   &&   r'   restart_liner	    se     ++G,B
/CC5#c(?Q/7C-c#gY//3Bxr/   c                      a  ] tR tRt o R tRtRtRtR tR t	R t
R!R ltR tR	 tR
 tR tR"R ltRtR tRtR tR tR tR t^ tR tR#R ltR tR tR tR#R ltR tR t R t!R t"R t#R t$R t%R t&R t'V t(R# )$ModifiedInterpreteri  c                    Wn         \        P                  R ,          P                  p\        P
                  ! WR7       RV n        RV n        \        V n	        V P                  P                  P                  V n        R# )r   )localsFN)	tkconsolesysmodules__dict__r
   rK   
restartingsubprocess_arglistPORTportcompilecompilerflagsoriginal_compiler_flags)rG   r  r  s   && r'   rK   ModifiedInterpreter.__init__  sW    "Z(11''<"&	'+||'<'<'B'B$r/   Nc                    V P                   f   V P                  4       V n         \        \        P                  RR7      p\
        P                  ! V P                   VR7      V n        R # )Ndumb)TERM)env)r  build_subprocess_arglistdictrR   environ
subprocessPopen
rpcsubproc)rG   r  s   & r'   spawn_subprocess$ModifiedInterpreter.spawn_subprocess  sI    ""*&*&C&C&ED#2::F+$**4+B+BLr/   c                   \         P                   Uu. uF  pR V,           NK  	  pp\        P                  ! RRRRRR7      pRV: R2p\         P                  .V,           R	V\        V P                  4      .,           # u upi )
z-WmainGeneralzdelete-exitfuncFbool)defaulttypez#__import__('idlelib.run').run.main()-c)r  warnoptionsr   	GetOption
executabler   r  )rG   sr   	del_exitfcommands   &    r'   r  ,ModifiedInterpreter.build_subprocess_arglist  sz      #/!TAXX/ &&vy:K/46C	7	}AF!#tWc$))n&EEE 0s   A>c                b   \         V P                  3p\        ^4       F*  p\        P                  ! V4        \        V4      V n         M	  V P                  4        R# V P                  P                  P                  4       ^,          V n        \        ^ 8w  dD   V P                  P                  P                  \        P                  \        P                  ^4       V P!                  4        V P                  P                  P#                  ^
4        V P                  P%                  4        T P                  P+                  RT P,                  4       T P                  P+                  RT P,                  P.                  4       T P                  P+                  RT P,                  P0                  4       T P                  P+                  RT P,                  P2                  4       T P                  P+                  RT P,                  P4                  4       T P                  P+                  R\6        4       T P                  P+                  RT 4       T P9                  R	R
7       T P;                  4        T P                  #   \         d     EKm  i ; i  \&         d    T P)                  4         R# i ; i)   Nconsoler   stdoutstderrrP   r5   rp   Twith_cwd)HOSTr  r   timesleepr   rpccltr"   display_port_binding_errorlistening_sockgetsocknamer  
setsockoptsocket
SOL_SOCKETSO_REUSEADDRr%  
settimeoutacceptTimeoutErrordisplay_no_subprocess_errorregisterr  r   r9  r:  rP   r5   transfer_pathpoll_subprocess)rG   addris   &  r'   start_subprocess$ModifiedInterpreter.start_subprocess  s   dii qAJJqM)$/	  ++-KK..::<Q?	19
 KK&&11&2C2C+1+>+>C 	""--b1	KK  	Y7Wdnn&:&:;Xt~~'<'<=Xt~~'<'<=Wdnn&:&:;[)4Xt,D){{C  *  	,,.	s#   I<J <JJJ.-J.c                b   V P                   '       d   V P                  # R V n         V P                  4       pV'       d"    \        P                  ! V P                  4       V P                  P                  4        V P                  4        V P                  pVP                  pRVn        V P                  4         V P                  P                  4        T P                  TR7       TP                  4        TP                  P!                  RR4       TP#                  R4       TP#                  \%        TP&                  T4      4       TP                  P)                  RR4       TP                  P+                  RR4       T'       g   TP-                  4        T'       d1   \        P.                  ! T P                  4       TP1                  4        T P2                  T P4                  P6                  n        RT n         T P                  #     EL; i  \         d    T P                  4         R# i ; i)	TFNr;  r   end-1cr   restartleft)r  r@  getdebuggerr   close_subprocess_debuggercloseterminate_subprocessr  	executingr%  rI  rJ  rK  rM  stop_readlinerL   r   r    r	  r  mark_setmark_gravity
showpromptrestart_subprocess_debuggerload_breakpointsr  r  r  r  )rG   r<  r%   rr   r8  was_executings   &&&   r'   restart_subprocess&ModifiedInterpreter.restart_subprocess  s   ???;;  "44T[[A 	!!#..))!	KK  	H-Hh/dl7==(;<i2!!)V4 224;;?""$&*&B&B#{{A  	,,.	s    H 9H HH.-H.c                B    V P                   P                  R RR/ 4       R# )execinterrupt_the_serverNr   )r@  
remotecallr   s   &r'   __request_interrupt'ModifiedInterpreter.__request_interrupt  s    v'=r2Fr/   c                d    \         P                  ! V P                  R 7      P                  4        R# ))targetN)	threadingThread'_ModifiedInterpreter__request_interruptstartr   s   &r'   interrupt_subprocess(ModifiedInterpreter.interrupt_subprocess  s     8 89??Ar/   c                   V P                   e0   V P                  P                  P                  V P                   4        V P                  P
                  P                  4         V P                  P                  4        V P                  4        RV P                  n	        R V n        R #   \         d     LRi ; i  \         d     LHi ; i)NF)
_afteridr  rL   after_cancelr@  rB  rY  r!   rZ  r[  r   s   &r'   kill_subprocess#ModifiedInterpreter.kill_subprocess  s    ==$NN,,T]];	KK&&,,.	KK 	!!##(   		  		s#   $B( $B9 (B65B69CCc                     V P                   P                  4         V P                   P                  4        R#   \         d     R# i ; i  \         d     R# i ; i)z"Make sure subprocess is terminatedN)r$  killwaitr"   r   s   &r'   rZ  (ModifiedInterpreter.terminate_subprocess'  sQ    		OO  "
$$&   		s    A 9 AAAAc                    V'       d$   R .pVP                  \        P                  4       M\        P                  pV P                  RP	                  V4      4       R# )r`   zTif 1:
        import sys as _sys
        _sys.path = {!r}
        del _sys
        
N)extendr  rS   
runcommandformat)rG   r<  rS   s   && r'   rM  !ModifiedInterpreter.transfer_path4  sA    4DKK!88D  fTl		r/   c                   V P                   pVf   R #  VP                  V P                  RR7      pV'       d   V P                  P                  4        R V n        Vw  r4V P                  P                  pVR8X  d   Ve   \        \        V4      VR7       MjVR8X  d3   V P                  P                  R4      '       d   V P                  4        M1VR8X  d+   Rp\        Wd\        P                   R7       \        WdVR7        V P                  P#                  4        V P                  P                  '       gL   V P                  P&                  P)                  V P                  P*                  V P,                  4      V n        R # R #   \        \        \
        3 d6    T P                  P                  '       d    R # R pT P                  4         ELi ; i  \$         d     Li ; i)	Ng?)rz  OKr   	EXCEPTION<<toggle-jit-stack-viewer>>ERRORz/pyshell.ModifiedInterpreter: Subprocess ERROR:
)r@  pollresponse
active_seqr   r"   KeyboardInterruptr  closingrc  resetoutputr8  printreprgetvarremote_stack_viewerr  
__stderr__endexecutingr!   rL   afterpollintervalrN  rt  )rG   cltresponsehowwhatr8  errmsgs   &      r'   rN  #ModifiedInterpreter.poll_subprocessC  s~   kk;	&''d'CH NN&&("DO ICnn,,Gd{#$t*73#>>(()FGG,,.Kf8f1++- ~~%%% NN//55++T-A-ACDM &9 '#45 	& ~~%%%H##%	&2 " s)   F G 1G9GGG G c                    Wn         R # rD   r   )rG   r   s   &&r'   setdebuggerModifiedInterpreter.setdebuggerk  s     r/   c                    V P                   # rD   r   r   s   &r'   rW  ModifiedInterpreter.getdebuggern  s    }}r/   c                f    V P                   P                  P                  RV P                  4       R# )ab  Initiate 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  rL   r  r  r   s   &r'   open_remote_stack_viewer,ModifiedInterpreter.open_remote_stack_viewerq  s'     	!!#t'?'?@r/   c                $   ^ RI Hp V P                  P                  RRR/ 4      pVf'   V P                  P
                  P                  4        R# TP                  V P                  V4      p^ RIH	pH
p \        V P                  P
                  4      p\        P                  ! 4       p\        P                  ! VR4      R,          pV! Wh^ R7      p	V	P                  P!                  ^R	R
7       V! V	P"                  RV4      p
V
P%                  4        R# )r   )
debugobj_rrf  stackviewerN)ScrolledCanvasTreeNodenormalra   )bghighlightthicknessboth)expandfill)rP   )idlelibr  r@  remotequeuer  r   rv   StubObjectTreeItemidlelib.treer  r  Toplevelr   rc   rd   framepackcanvasr  )rG   r  oiditemr  r  r   rg   ra   scnodes   &          r'   r  'ModifiedInterpreter.remote_stack_viewer~  s    &kk%%fmZL;NN$$&,,T[[#>9t~~**+%%'**5(;LI
C1E
QV,		4.r/   c                J    V P                  V4      pV P                  W!4       R# )z1Like runsource() but assumes complete exec sourceN)stuffsourceexecfilerG   sourcer%   s   && r'   
execsourceModifiedInterpreter.execsource  s    ##F+h'r/   c                ^   Vfu   \         P                  ! V4      ;_uu_ 4       pVP                  4       p\        '       d2   R\        P
                  P                  V4       R2V,           R,           pRRR4        \        W!R4      pV P                  V4       R#   + '       g   i     L0; i  \        \        3 dp    T P                  P                  4        \        RT P                  P                  R7       \        P                   ! Y4       T P                  P#                  4         R# i ; i)zExecute an existing fileNz__file__ = r'''z'''
z
del __file__rf  zB*** Error in script or command!
Traceback (most recent call last):r   )tokenizer   readuse_subprocessrR   rS   abspathr  runcodeOverflowErrorSyntaxErrorr  r  r  r:  r
   showsyntaxerrorr_  )rG   r%   r  r   codes   &&&  r'   r  ModifiedInterpreter.execfile  s    >x((B!> /0I/J%P &')9:F )

	6V4D LL )( {+ 	(NN&&( 6~~,,. #224BNN%%'	(s   AB:B, B)	,A<D,+D,c                R    V P                  V4      p\        P                  ! WV4      # )zBExtend base class method: Stuff the source in the line cache first)r  r
   	runsourcer  s   && r'   r  ModifiedInterpreter.runsource  s'    ##F+
 &//hGGr/   c                    RV P                   ,          pV P                   ^,           V n         VP                  R4      p\        V4      ^,           ^ W23\        P                  V&   V# )z"Stuff source in the filename cachez<pyshell#%d>r   )gidsplitr   r5   r6   )rG   r  r%   r   s   &&  r'   r  ModifiedInterpreter.stuffsource  sO    !DHH,88a<T"$'KM1e$E	!r/   c                F    V P                  RP                  V4      4       R# )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  rG   r%   s   &&r'   prepend_syspath#ModifiedInterpreter.prepend_syspath  s      &"	$r/   c                >   V P                   pVP                  pVP                  RRR4       \        P                  ! 4       w  rVp\        VRR4      ;'       g    T;'       g    Rp\        VRR4      ;'       g    ^p	\        VRR4      ;'       g    ^ p
V
^ 8X  d
   V	^,          p	V	^8X  d   R	V
^,
          ,          pMR
V	^,
          V
^,
          3,          pVP                  WK4       VP                  4        V P                  RV,          4       VP                  4        R# )zOverride Interactive Interpreter method: Use Colorizing

Color the offending position instead of printing it and pointing at it
with a caret.

r  r   r   msgr`   z<no detail available>r&   offsetziomark + %d charsz&iomark linestart + %d lines + %d charszSyntaxError: %s
N)
r  rL   r~   r  exc_infor   colorize_syntax_errorr  r    r_  )rG   r%   kwargsr  rL   r,  valuetbr  r&   r  poss   &&,         r'   r  #ModifiedInterpreter.showsyntaxerror  s     NN	~~.,,.ReUB'KK5KK4K"-22"-22Q;aKFQ;%2C:!8VAX&'C''2

&,-r/   c                    V P                   P                  4        V P                  4        \        P                  ! V 4       V P                   P                  R4      '       d   V P                   P                  4        R# R# )z1Extend base class method to reset output properlyr  N)r  r  checklinecacher
   showtracebackr  open_stack_viewerr   s   &r'   r  !ModifiedInterpreter.showtraceback  sX    ""$,,T2>>  !>??NN,,. @r/   c                    \         P                  p\        V4       F  pVR,          VRR ,           R8w  g   K  W K!  	  R# )z%Remove keys other than '<pyshell#n>'.r1   Nr3   r4   )r5   r6   r7   )rG   r6   r<   s   &  r'   r  "ModifiedInterpreter.checklinecache  s5    ;C2wRS!T)J r/   c                    V P                   P                  '       d   V P                  4        ^ # V P                  '       d"   V P                  P	                  RRV3/ 4       ^# \        WP                  4       ^# )z*Run the code without invoking the debuggerrf  r  )r  r[  display_executing_dialogr@  r  rf  r  )rG   r  s   &&r'   r~  ModifiedInterpreter.runcommand  s\     >>###))+;;;KK##FIwC  {{#r/   c                
   V P                   P                  '       d   V P                  4        V P                  4        V P                  p V P                   P                  4        V'       g4   V P                  e&   V P                  P                  RRV3/ 4      V n        M;V'       d   VP                  ! WP                  4       M\        WP                  4        \$        '       g    V P                   P+                  4        R# R#   \         df    T P                   P                  '       gH   \        P                  ! RRRT P                   P                   R7      '       d   h T P#                  4         Lh  \$        '       dN   \'        RT P                   P(                  R	7       T P#                  4        T P                   P+                  4         LT P                   P,                  '       d6   R
T P                   n        \'        RT P                   P(                  R	7        ELET P#                  4         ELX; i  \.         d     R# i ; i  \$        '       g.    T P                   P+                  4        i   \.         d     i i ; ii ; i)Override base class methodNrf  r  zExit?zDo you want to exit altogether?yesr+  r   z IDLE internal error in runcode()r   Fr  )r  r[  rc  r  r   beginexecutingr@  
asyncqueuer  runr  rf  
SystemExitr  r	   askyesnorL   r  r  r  r:  r  canceledr!   )rG   r  r   s   && r'   r  ModifiedInterpreter.runcode  s   >>#####%==&	NN))+ 7"&++"8"89=#ET;;/T;;'4 ">NN//1 "3  	>>)))&&5!>>..	0 0
 &&(	)~8>>002""$++->>***.3DNN+-DNN4I4IJJ&&(
 &  ">NN//1%  "s   
AD I D 'D I D I 'H5 &H2,3H2 H21I 3H2AH2I H2*2H2I H2/I 5IIJI0/J0I>;J=I>>Jc                L    V P                   P                  P                  V4      # )r  )r  r:  r    )rG   r2  s   &&r'   r    ModifiedInterpreter.write*  s    ~~$$**1--r/   c                `    \         P                  ! R RV P                  P                  R7       R# )zPort Binding ErroraA  IDLE 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.r   Nr	   r   r  rL   r   s   &r'   rA  .ModifiedInterpreter.display_port_binding_error.  s'     / >>&&	(r/   c                `    \         P                  ! R RV P                  P                  R7       R# )zSubprocess 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-failurer  Nr  r   s   &r'   rK  /ModifiedInterpreter.display_no_subprocess_error9  s(    )J >>&&	(r/   c                `    \         P                  ! R RV P                  P                  R7       R# )zAlready executingzYThe Python Shell window is already executing a command; please wait until it is finished.r  Nr  r   s   &r'   r  ,ModifiedInterpreter.display_executing_dialogA  s%    0>>&&		(r/   )rt  r  r   r  r  r  r  r@  r$  r  r  )Fr`   )FrD   ))r   r   r   r   rK   rt  r@  r$  r%  r  rQ  rc  ro  rq  rv  rZ  rM  r  rN  r   r  rW  r  r  r  r  r  r  r  r  r  r  r  r~  r  r    rA  rK  r  r   r   r   s   @r'   r  r    s     C HFJM
F)V*XGB J$CL H!" C(
(H
$4/
,\.	((( (r/   r  c            	         a a ] tR tRt o^ RIHt R]! 4       ,           t]t	]
t. R6Ot]P                  R7.,           t^]! ]! ]P$                  ! R ]4      4      4      ,           t]P)                  ]R84       ARtRt^ RIHt ^ RIHt R9R	 ltV 3R
 ltV 3R ltR tR tR t R9R lt!Rt"Rt#Rt$Rt%Rt&Rt'R t(R t)R9R lt*R t+R9R lt,R t-R t.R t/R t0R t1R t2R t3R t4R t5Rt6R t7R  t8R! t9R" t:R9R# lt;R$ t<R% t=R& t>R' t?]@P                  ! R(4      tBR) tCR9R* ltDR9R+ ltER9R, ltFR- tGR. tHR/ tIR:R0 ltJV 3R1 ltKV 3R2 ltLR9R3 ltMR4 tNR5tOVtPV ;tQ# );r   iI  )SqueezerzIDLE Shell c                    V ^ ,          R8g  # )r   r   r   )
rmenu_items   &r'   r   PyShell.<lambda>a  s    :a=F2r/   Fr   )History)ShellSidebarc                4	   V P                   pV^,          ^ ,          R8w  d   VP                  ^R4       \        V 4      V n        Vf1   \	        4       p\        V4       VP                  4        \        V4      pRV n        \        P                  ! WRR4       RV n        ^V n        \        \        R4      '       d   \        P                  MRV n        V P                   P#                  R4      R,          V n        V P                   V n        V P(                  pVP+                  RR7       VP-                  R	V P.                  4       VP-                  R
V P0                  4       VP-                  RV P2                  4       VP-                  RV P4                  4       VP-                  RV P6                  4       VP-                  RV P8                  4       VP-                  RV P:                  4       VP-                  RV P<                  4       \>        '       d9   VP-                  RV P@                  4       VP-                  RV PB                  4       T PE                  V 4      V n#        VP-                  RV PH                  4       \        PJ                  V n&        \        PN                  V n(        \        PR                  V n*        ^ RI+H,p \[        V RVP\                  VP^                  4      V n)        \a        V RVP\                  VP^                  4      V n%        \a        V RVP\                  R4      V n'        \a        V RVP\                  VP^                  4      V n1        \>        '       g@   V PJ                  \        n%        V PN                  \        n'        V PR                  \        n)         ^ RI2pVPf                  Vn4        T Pm                  T P(                  4      T n7        ^2T n8        T Ps                  T 4      T n        T Pt                  Pv                  P                  T P(                  n        T Pt                  Py                  \{        4       4       \>        '       g)   T P}                  R^ R4       T P}                  R^R4       R# R#    \        Pj                  \        n'        h ; i)   shellNFps1z>>>
r   char)wrapz<<newline-and-indent>>z<<plain-newline-and-indent>>z<<interrupt-execution>>z<<end-of-file>>z<<open-stack-viewer>><<toggle-debugger>>r  <<copy-with-prompts>>z<<view-restart>>z<<restart-shell>><<squeeze-current-text>>)iomenur   r9  r:  backslashreplacer8  disabled)r  She_llr4   )?
menu_specsru   r  rp   Tkr   withdrawr   shell_sidebarr   rK   usetabsindentwidthhasattrr  r	  sys_ps1r  prompt_last_linepromptrL   	configurerM   enter_callbacklinefeed_callbackcancel_callbackeof_callbackr  toggle_debuggertoggle_jit_stack_viewercopy_with_prompts_callbackr  view_restart_markrestart_shellr   squeezersqueeze_current_text_eventr9  save_stdoutr:  save_stderrr   
save_stdinr  r  r   encodingerrorsr   r8  pydoc
plainpagerpagerr  r  historyr  r  perr   insertfilterr   update_menu_state)rG   rP   msr   rL   r  r.  s   &&     r'   rK   PyShell.__init__o  sZ   __a58wIIa,-)$/=4D$MMO#D)E!d46")#u"5"5sww7 $ 2 24 8 <llyyF#		*D,?,?@		0$2H2HI		+T-A-AB		#T%6%67		)4+A+AB		')=)=>		/1M1MN		)4+J+JK>II($*@*@AII)4+=+=>d+		,11	3 ::::))"!$"(//6==B
#D($*OOV]]D#D($*OO5GI$T9%+__fmmE~CJCJ

CI	**EK
 ||DII.!..t4
  88<<..		79:~""7Az:""7Az: !	CJs   !Q; ;Rc                x   < \         SV `  4        V P                  e   V P                  P                  4        R # R # rD   )r   	ResetFontr  update_fontrG   r   s   &r'   r8  PyShell.ResetFont  s1    )**, *r/   c                  < \         SV `  4        \        P                  ! 4       pR RRRR/R\        P                  ! VR4      R\        P                  ! VR4      R\        P                  ! VR4      /pVP                  4        F"  w  r4V P                  P                  ! V3/ VB  K$  	  V P                  e   V P                  P                  4        R# R# )r   ra   Nr_   r9  r:  r8  r  )
r   ResetColorizerr   rc   rd   itemsrL   tag_configurer  update_colors)rG   rg   
tag_colorsr   tag_colors_configr   s   &    r'   r=  PyShell.ResetColorizer  s     %%'
L$d;
H))%:
H))%:
X**5(;	

 '1&6&6&8"CII##C=+<= '9 ),,. *r/   c                J    \         P                   ! V P                  R R7       R# )r   )insert_tagsr^   )r   rL   r   s   &&r'   replace_eventPyShell.replace_event  s    		w7r/   c                0    \         P                  ! R R7      # )T)
shell_only)r   GetExtensionsr   s   &r'   get_standard_extension_names$PyShell.get_standard_extension_names  s    %%66r/   c                v   V P                   P                  W4      p\        \        \	        V4      4      \        \	        V4      4      4      pV Uu. uF(  pV P
                  P                  P                  V4      NK*  	  ppRP                  R \        WcP                  4       4       4       4      R,           # u upi )z6Return text between first and last with prompts added.r   c              3   @   "   T F  w  rVf   TMV RV 2x  K  	  R # 5i)N r   ).0r  r   s   &  r'   	<genexpr>*PyShell.get_prompt_text.<locals>.<genexpr>  s-      
 ? ND6(!D6(:: ?s   )
rL   getr   rw   rx   r  line_promptsrT   zip
splitlines)rG   firstlastrL   lineno_ranger&   promptss   &&&    r'   get_prompt_textPyShell.get_prompt_text  s    yy}}U)ed '
& ++//7& 	 
 yy 
 #G__-> ?
 
  		
s   .B6c                   V P                   pVP                  R4      pVf   R# VP                  R4      pVR,          R8w  d   VP                  R4      pVP                  4        V P                  W44      pVP	                  V4       R# )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.
zsel.first linestartNsel.last0zsel.last+1line linestartr4   )rL   rl   clipboard_clearr[  clipboard_append)rG   ry   rL   selfirstsellastprompt_texts   &&    r'   r$  "PyShell.copy_with_prompts_callback  sx     yy::34**Z(2;#jj!;<G**8=k*r/   c                
    Vs R # rD   r   )rG   streams   &&r'   set_warning_streamPyShell.set_warning_stream
  s    r/   c                    \         # rD   rg  r   s   &r'   get_warning_streamPyShell.get_warning_stream  s    r/   c                   V P                   '       d6   \        P                  ! R RV P                  R7       V P	                  4        R# V P
                  P                  4       pV'       d   V P                  4        R# V P                  4        R# )zDon't debug nowz*You can only toggle the debugger when idler  r^   N)	r[  r	   r   rL   set_debugger_indicatorrp   rW  close_debuggeropen_debugger)rG   ry   dbs   && r'   r"  PyShell.toggle_debugger  sd    >>>  !2<yy" '')((*B##%""$r/   c                f    V P                   P                  4       pV P                  R V'       4       R# )r  N)rp   rW  setvarrG   rr  s   & r'   ro  PyShell.set_debugger_indicator  s%    [[$$&)2v6r/   c                    R # rD   r   r   s   &&r'   r#  PyShell.toggle_jit_stack_viewer#  s    r/   c                   V P                   P                  4       pV'       d   V P                   P                  R 4       VP                  4        V P                   P                  '       d+   \
        P                  ! V P                   P                  4       V P                  4        V P                  P                  R4       V P                  V n        V P                  4        V P                  4        R # )Nz[DEBUG OFF]
)rp   rW  r  rY  r@  r   close_remote_debuggerr  r8  r    r  r  r_  ro  rv  s   & r'   rp  PyShell.close_debugger&  s    [[$$&KK##D)HHJ{{!!!001C1CDLL/,,DKOO##%r/   c                   V P                   P                  '       d-   \        P                  ! V P                   P                  V 4      pM\        P
                  ! V 4      pV P                   P                  V4       VP                  4        R V P                  ,           V n	        V P                  4        V P                  4        R# )z[DEBUG ON]
N)rp   r@  r   start_remote_debuggerr   Debuggerr  ra  r  r  r_  ro  )rG   dbg_guis   & r'   rq  PyShell.open_debugger3  s    ;; 66t{{7I7I;?AG ''-G(  "$t||3##%r/   c                X    V P                   '       d   R MRpV P                  RRV4       R# )r  r  rr   z*tack*iewerN)r[  r4  )rG   states   & r'   debug_menu_postcommandPyShell.debug_menu_postcommand?  s#    "nnn
(wu=r/   c                4    V P                  4        RV n        R# )Helper for ModifiedInterpreterTN)r  r[  r   s   &r'   r  PyShell.beginexecutingC  s    r/   c                B    RV n         RV n        V P                  4        R# )r  FN)r[  r  r_  r   s   &r'   r  PyShell.endexecutingH  s    r/   c                    V P                   '       d-   \        P                  ! RRRV P                  R7      pVRJ d   R# V P	                  4        RV n        RV n        \        P                  ! V 4      # )zExtend EditorWindow.close()zKill?z7Your program is still running!
 Do you want to kill it?okr  FcancelT)	r[  r	   askokcancelrL   r\  r  r  r   rY  )rG   r  s   & r'   rY  PyShell.closeN  sc    >>>!--Jyy	"H
 5 !!$''r/   c                h   V P                  4        \        '       d   V P                  P                  4        V P                  \
        n        V P                  \
        n        V P                  \
        n
        RV n        RV n        RV P                  n        RV n        \        P                   ! V 4       R# )zEExtend EditorWindow._close(), shut down debugger and execution serverN)rp  r  rp   rv  r)  r  r9  r*  r:  r+  r   r8  rP   ro   r1  r   r   r   s   &r'   r   PyShell._close]  sw    >KK'')%%
%%
OO	!

D!r/   c                    R# )z8Override EditorWindow method: never remove the colorizerTr   r  s   &&r'   ispythonsourcePyShell.ispythonsourcem  s    r/   c                    V P                   # rD   )shell_titler   s   &r'   short_titlePyShell.short_titleq  s    r/   z>Enter "help" below or click "Help" above for more information.c           
         V P                   P                  R R4       V P                  4        \        '       d8   RpV P                  P                  4       pV'       g   V P                  4        R# MR	p\        P                  \        n        V P                  R\        P                  : R\        P                  : RV P                  : RV: 24       V P                   P                  4        V P                  4        ^ RIpRVn        RVn        R# )
r   ru   r`   FzPython z on r   NTz==== No Subprocess ====

WARNING: Running IDLE without a Subprocess is deprecated
and will be removed in a later version. See Help/IDLE Help
for details.

)rL   r]  r  r  rp   rQ  rY  r   displayhookr  r    versionplatform
SPLASHLINEfocus_forcer_  tkinter_support_default_root_default_root)rG   nosubclientr  s   &   r'   r   PyShell.beginv  s    		8X.>E[[113F

 'E "ooCO

KKtG 	H		(,% $r/   c                p    V P                   '       g   R # RV n        V P                  P                  4        R # )NT)reading_stop_readline_flagr   quitr   s   &r'   r\  PyShell.stop_readline  s#    |||#' r/   c                   V P                   p R V n         V P                  P                  4        Wn         V P                  '       d
   RV n        R# V P                  P                  RR4      p\        V4      ^ 8X  d   RpV P                  4        V P                  '       d   RV n        \        '       g   \        hV P                  '       d
   RV n        RpV#   Yn         i ; i)TFr`   r   rT  r   )r  r   mainloopr  rL   rS  r   r  r  r  r  	endoffile)rG   r;   r   s   &  r'   readlinePyShell.readline  s    ||	 DLHHL###',D$yy}}Xx0t9>D===!DM!>''>>>"DND  Ls   !C Cc                    R # r   r   r   s   &r'   isattyPyShell.isatty  s    r/   c                    V P                   P                  R RR4      '       d   R#  T P                  '       gP   T P                  '       g>   T P	                  4        T P
                  P                  R4       T P                  4        R# RT n        RT n	        T P                  '       dr   T P
                  P                  '       dV   T P
                  P                  4       '       d   T P
                  P                  4        MT P
                  P                  4        T P                  '       d   T P                  P                  4        R#     EL%; i)	sel.firstz!=r^  NzKeyboardInterrupt
r^   FT)rL   r   r[  r  r  rp   r    r_  r  r  r@  rW  rc  rq  r   r  r   s   &&r'   r   PyShell.cancel_callback  s    	yy  dJ?? @ $,,,KK34OONNNt{{111{{&&((..0002<<<HHMMO!	s   "E Ec                   V P                   '       d   V P                  '       g   R # V P                  P                  RRR4      '       d$   V P                  P                  RRR4      '       g   R # V P                   '       g#   V P	                  4        V P                  4        R# RV n        RV n        V P                  P                  4        R# )Nr   z==ru   rT  FTr^   )
r[  r  rL   r   r  rY  r  r  r   r  r   s   &&r'   r!  PyShell.eof_callback  s    >>>$,,,		!!(D(;;		!!(D(;;~~~JJL
  "DM!DNHHMMOr/   c                    V P                   '       d:   V P                  P                  R R4       V P                  P                  R 4       R# V P	                  V4       R# )ru   r   r^   )r  rL   ru   seenewline_and_indent_eventr   s   &&r'   r  PyShell.linefeed_callback  sG    <<<IIXt,IIMM(#  ))%0r/   c                N   V P                   '       d   V P                  '       g   R #  V P                  P                  RR4      pV'       d7   V P                  P	                  RRR4      '       d   V P                  W!4       R# T P                  P	                  RRR4      '       Ed^   T P                  P                  R	R4      pT'       Edw   T P                  P	                  RRT^,          4      '       EdL   R
T P                  P                  R4      9  Ed+   T P                  P                  R
R4      pT'       dD   T P                  P	                  T^,          RT^ ,          4      '       d   T^,          T^,          3pT P                  P                  R
R4      pT'       dd   T P                  P	                  T^ ,          RT^,          4      '       d3   T^ ,          T P                  P                  T^ ,          R,           4      3pT P                  T P                  P                  T^ ,          T^,          4      T4       R# T P                  P                  R	R4      pT'       d   T P                  P	                  RRT^ ,          4      '       d   T P                  P                  R
R4      pT'       dd   T P                  P	                  T^ ,          RT^,          4      '       d3   T^ ,          T P                  P                  T^ ,          R,           4      3pT P                  T P                  P                  T^ ,          T^,          4      T4       R# T P                  P                  R
R4      pT'       d`   T P                  P	                  T^ ,          RR4      '       d6   T P                  T P                  P                  T^,          R4      T4       R# T P                  T P                  P                  RR4      T4       R# T P                  P	                  RRR4      '       d   T P                  P                  RR4       T P                  P                  RR4      pT'       d3   TP                  4       '       g   T P                  P                  RR4       T P                  P	                  RRR4      '       d   T P                  T4       R# T P                  P                  RR4       T P                  '       d9   T P                  P                  RR4       T P                  P                  R4       MT P                  T4       T P                  P!                  4        T P                  '       d   T P"                  P%                  4        R# T P'                  4        R#     EL"; i)Nr  r^  z<=r   r^   ru   r   iomark linestartr   r8  z>=z+1czinsert lineendr|   rT  zend-1c linestartr   )r[  r  rL   rS  r   recalltag_prevrange	tag_namestag_nextrangerl   r]  stripr   r  ru   r  update_idletasksr   r  runit)	rG   ry   selprev	prev_cons	next_consnextindicesr2  s	   &&       r'   r  PyShell.enter_callback  s   >>>$,,,	))--Z8C99$$Zx@@KK+" 99Xs,>??
 99**7H=DDII%%hT!W==TYY%8%8%BB II33IxH	!2!29Q<tAw!O!O%aL$q'2D II33IxH	!2!29Q<d1g!N!N GTYY__Yq\E5I%JKDDIIMM$q'47;UC99**7H=D		))*:D$q'JJ II33I?OP	!2!29Q<d1g!N!N GTYY__Yq\E5I%JKDDIIMM$q'47;UCii--i9KLGyy  T3EFFDIIMM'!*6FGO  DIIMM*<>NOQVW 99XsH55IIx2 IIMM(H-QWWYYIIXx0 99Xs,>??))%0		8X.<<<IIXt,IIMM(#))%0		""$<<<HHMMO  JJLE	s   #V "V /V V$c                   \         P                  ! R RV4      p\         P                  ! RRV4      pVP                  R4      pV P                  P	                  4         V P                  P                  RRR4       V P                  P                  RR4       V P                  P                  R	R4      pVP                  4       P                  R
4      '       d.   V P                  V4       V P                  P                  R	R4      pV P                  P                  RV^ ,          P                  4       V P                  4       \        V4      ^8  d   \         P                  ! RV^ ,          4      P!                  ^ 4      p\         P                  ! RV4      P!                  ^ 4      pVR,           Fj  pVP#                  V4      '       d   Wg\        V4      R ,           pV P                  P                  RRVP                  4       ,           V P                  4       Kl  	  V P                  P%                  R4       V P                  P'                  4        R#   T P                  P%                  R4       T P                  P'                  4        i ; i)z^\s*\nr`   z\n\s*$r   r  r   r   ru   rT  r|   :z	^([ \t]*)r2   NNN)resubr  rL   undo_block_startr~   r]  rS  rstripendswithr  ru   r  user_input_insert_tagsr   searchgroupr   r  undo_block_stop)rG   r2  ry   r   prefixorig_base_indentnew_base_indentr   s   &&&     r'   r  PyShell.recall-  s   FF9b!$FF9b!$		""$	(II  u5IIx2YY]]#5x@F}}'',,--e4'98DIIXuQx~~'7!88:5zA~#%99\58#D#J#J1#M #%99\6#B#H#H#K!"IID'788.c:J6K6L1MMII$$Xtdkkm/C%)%@%@B	 & IIMM(#II%%' IIMM(#II%%'s   A9I EI 7Jz[ \t]*(\n[ \t]*)?\zc                   V P                   P                  R 4      pV P                   P                  RR4      pV P                  P	                  RV4      pV P
                  P                  V4      pV'       gc   V P                   P                  V4      R8X  d'   V P                   P                  V P                  V4       V P                  P                  4        R# R# )end-2cr   rT  r`   r   N)rL   rl   rS  _last_newline_rer  rp   r  r~   r  r  update_sidebar)rG   index_beforer   input_is_completes   &   r'   r  PyShell.runitJ  s    yyx0yy}}Xx0 $$((T2 KK11$7 yy}}\*d2		$$T%@%@,O--/ !r/   c                .   V P                   P                  '       d   V P                   P                  4       # ^ RIHp  V! V P
                  \        P                  V P                  4       R#    \        P                  ! RRT P                  R7        R# ; i)r   )StackBrowserzNo stack tracez:There is no stack trace yet.
(sys.last_exc is not defined)r  N)rp   r@  r  idlelib.stackviewerr  r   r  last_excrP   r	   r   rL   )rG   ry   r  s   && r'   r  PyShell.open_stack_viewerV  ss    ;;;;22444	"CLL$**= 	"  !10yy" s   ,A, ,%Bc                r    V P                   P                  R 4       V P                   P                  R4       R# )r   rU  N)rL   r  r   s   &&r'   r%  PyShell.view_restart_markd  s"    		h		i r/   c                >    V P                   P                  RR7       R# )z&Callback for Run/Restart Shell Cntl-F6Tr;  N)rp   rc  r   s   &&r'   r&  PyShell.restart_shellh  s    &&&5r/   c                   V P                  4        V P                  pV P                  '       d;   VP                  V P                  4      '       d   VR \	        V P                  4      )  pV P
                  P                  RR4       V P                  P                  V4       V P                  P                  4        V P
                  P                  RR4       V P                  4        V P                  P                  4        R # )Nr8  z	iomark-1cru   rT  )r  r  r  r  r   rL   rk   r8  r    r  r  r]  set_line_and_columnrW   
reset_undo)rG   r  s   & r'   r_  PyShell.showpromptl  s    <<<FOODLL99/c$,,//0F		)[16"))+		8X.  "r/   c                0   V P                   P                  P                  p\        V^RR7      pRP	                  VP                  V4      4      pVP                  R4      '       g
   VR,          pV P                  P                  P                  RVR4       R# )   T)r  tabsizeexpand_tabsr   r  r:  N)
rp   r  r  r   rT   r  r  r2  bottomru   )rG   r  r  wrapperwrapped_msgs   &&   r'   show_warningPyShell.show_warningz  sr    %%++E1$GiiS 12##D))4K1;Ir/   c                   V P                   P                  R R4      pV P                  '       d   V P                  P                  V4       V P                   P                  R4      R8w  d   V P                   P	                  RR4       V P                   P                  R R4       V P                  4        V P                  P                  4        R# )r   rT  r  r   N)	rL   rS  r1  storeru   r]  r  ctipremove_calltip_window)rG   r  s   & r'   r  PyShell.resetoutput  s    x2<<<LLv&99=="d*IIXt,		8X.  "		'')r/   c                
    V P                   P                  R R4       \        P                  ! WVR 4      pV P                   P                  R R4       T P                  '       d   RT n        \
        '       g   \        hT#    h ; i)r   rightrV  F)rL   r^  r   r    r  r  r  )rG   r2  r   counts   &&& r'   r    PyShell.write  so    	II""8W5 &&th?EII""8V4 ===!DM!>''	s   AA? ?Bc                   <  V P                   P                  R RR4      '       d   R#  \        ST `  4       #   \         d     R# i ; i)r  r   r   r  )rL   r   r   r   r   r:  s   &r'   r   PyShell.rmenu_check_cut  sM    	yy  c8<<! = w&((  		s   "7 AAc                j   < V P                   P                  R RR4      '       d   R# \        SV `  4       # )ru   r   r   r  )rL   r   r   r   r:  s   &r'   r   PyShell.rmenu_check_paste  s-    99Xc(33w(**r/   c                n    V P                   P                  4        V P                  P                  4        R # rD   )r'  squeeze_current_textr  r  r   s   &&r'   r(  "PyShell.squeeze_current_text_event  s$    **,))+r/   c                :    V P                   P                  4        R # rD   )r  r  )rG   rl   rL   r   s   &&&&r'   on_squeezed_expandPyShell.on_squeezed_expand  s    ))+r/   )r  r  r  r8  r  r[  r1  r  rp   r  r  r  r  r*  r+  r)  r  r'  r:  r   r9  r  r  ))r   _File)edit_Edit)rr   _Debug)options_Options)window_Window)help_Help)Squeezer  )zCopy with promptsr  r   rD   )r   )Rr   r   r   r   idlelib.squeezerr   r   r  r   r   r   r   r  r   r   r   r7   	itertools	takewhile_idxru   allow_line_numbersr  idlelib.historyr  idlelib.sidebarr  rK   r8  r=  rF  rK  r[  r$  r  r[  r  r  r  r  ri  rl  r"  ro  r#  rp  rq  r  r  r  rY  r   r  r  r  r   r\  r  r  r   r!  r  r  r  r  r  r  r  r  r%  r&  r_  r  r  r    r   r   r(  r	  r   r   r   r   s   @@r'   r   r   I  s    )."22K ,N)MJ **/. K s4	++2KA   D t 2 3 	$ (,P;d-/ 7"+( GIHIG %7&
&>
("   RJ4.,M^(8 zz"89
0!6J*)+
,, ,r/   r   c           
         V P                   R8X  d6   R F-  pV P                  VRRV P                  VR4      ,           4       K/  	  R# R# )z6Make paste replace selection on x11.  See issue #5124.x11z	<<Paste>>z%catch {%W delete sel.first sel.last}
N)TextEntrySpinbox)_windowingsystem
bind_class)r   clss   & r'   fix_x11_paster%    sG    %-COO8[9:; . &r/   a  
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            	         ^ RI p ^ RIHp ^ RIHp ^ RIHp \        R4       RsRpRpRpRpRpRp	 V P                  \        P                  R,          R4      w  rX
 EF  w  rVR8X  d   TpRpVR8X  d   RpRpVR8X  d   RpVR8X  d9   \        P                  P!                  \        4       \        P                  ! 4        VR8X  d   RpVR8X  d   \        R\        P                  R7       RsVR8X  dL   Tp\"        P$                  P'                  V4      '       d   M!\        RV4       \        P                  ! 4        RpVR8X  d   Rp	RpVR8X  g   K  V\(        n        RpEK  	  X'       d/   V^ ,          R8X  d!   \        P,                  P/                  4       pRp\1        \3        \        P$                  4      4       FH  p\"        P$                  P5                  \        P$                  V,          4      \        P$                  V&   KJ  	  V'       d+   V^ ,          R8X  d   R.VR,          ,           \        n	        EM&V'       d   R.V,           \        n	        EM	V'       d   V.V,           \        n	        MV'       d   Rp. pV F1  pVP7                  \"        P$                  P9                  V4      4       K3  	  V FY  p\"        P$                  P5                  V4      pV\        P$                  9   d   K9  \        P$                  P;                  ^ V4       K[  	  MJ\"        P<                  ! 4       pV\        P$                  9  d!   \        P$                  P;                  ^ V4       \>        P@                  ! RRRRR7      pT;'       g    TpT;'       g    V'       * p\        '       d   V'       g   \C        4        \E        RR7      s#\F        PI                  4        ^ R I%H&p V! \F        4       \"        P$                  PO                  \"        P$                  P9                  \P        4      R!4      pV! 4       R"8X  d8   \"        P$                  PO                  VR#4      p\F        PS                  VR$7       MVPU                  4       '       g   \V        R%8  d   R&pR.pMR'pR/pV Uu. uF,  p\"        P$                  PO                  VR(VV3,          4      NK.  	  ppV Uu. uF  p\Y        \F        VR)7      NK  	  pp\F        PZ                  ! R.VO5!   \]        \F        4       \_        \F        4       \a        \F        4      s1VPe                  \F        \b        4       V'       dg   V'       g_   V'       gW   VR*,           F-  p\b        Pg                  V4      e   K  VPi                  V4       K/  	  V'       g   \b        Pk                  4        V'       df   \b        Pm                  4       pV'       g   R# VPU                  4       '       d1   \b        Pn                  '       d   VPp                  Ps                  4        M\b        Pt                  pV'       d   VPw                  4        V	'       d   \"        Px                  P{                  R+4      ;'       g     \"        Px                  P{                  R,4      pV'       dA   \"        P$                  P'                  V4      '       d   VP|                  P                  V4       V'       g	   V'       d   VP|                  P                  R-P                  \        P                  4      4       V'       d   VP|                  P                  V4       MpV'       d7   VP|                  P                  V4       VP|                  P                  V4       M1V'       d*   VP                  4       pV'       d   VP                  V4       \b        P                  '       d   \F        P                  4        K,  \F        P                  4        \        R4       R#   T P                   dG   p\        R	T R
\         2\        P                  R7       \        P                  ! ^4        Rp?ELRp?ii ; iu upi u upi )0r   N)system)testing)macosxTFr  zc:deihnr:st:zError: r   r   r.  z-dz-ez-hz-iz-nz: Warning: running IDLE without a subprocess is deprecated.z-rzNo script file: z-sz-t-r`   r(  r)  zeditor-on-startupr*  )r,  Idle)	className)fix_scalingIconsWindowszidle.ico)r+  g333333!@z.pngz.gifz	idle_%d%s)masterr   :NNNIDLESTARTUPPYTHONSTARTUPzdif 1:
            import sys as _sys
            _sys.argv = {!r}
            del _sys
            
)       0      )r3  r4  r5  )Igetoptr  r'  r  r(  r)  r.   r  r  argverrorr  	usage_msgr:  exitr9  r    rR   rS   r   r   r  r   r  r   r   r  rn   dirnameru   getcwdr   r0  NoDefaultRootr  r   r  idlelib.runr-  rT   __file__wm_iconbitmapisAquaTk	TkVersion
PhotoImagewm_iconphotor   r%  r   rP   setupAppr   r}   newrQ   r   r   lowerro   rq  r!  rS  rp   r  r~  r  r  r  preferTabsPreferenceWarningr  inversedictr  destroy)r7  r'  r(  r)  enable_shellenable_editrr   cmdscriptstartupoptsr[   r  oarP  pathxr%   dir
edit_startr-  icondiriconfileextsizessize	iconfilesiconsr  prefer_tabs_preference_warnings                                 r'   r(  r(    s    TNLKE
CFG]]388B<@
 9CL9EL9K9JJY'HHJ9L9Nzz#"N9Fww~~f%%(&1
L9GL9"#GL? @ Q3iinn3sxx=!ggoochhqk2 "Q34$r(?	6D=	8d?	HLL23 C''//#&C#((?3' 
 iikchhHHOOAs###FI$7fFJ++K22{?L ~gDMMO' ggll277??84g>Gx977<<48,__C%EC E!&(!& WW\\';$+DE!& 	 ( "+,!*X 4h7!* 	 ,$'' $$D!E
OOD% v GG::h'/KK) $ 		  "??
 IIOO ::>>-0 3 3::>>/2 	x00LL!!(+
f ! &"		$
 LL##C(LL((0LL!!&)	 *0)K)K)M&)=>



LLNUy << uByk*<n(,s#   )` 2a)a.a& ;a!!a&)NN)Nr  r   r  r  ImportErrorr  r  r  r  idlelib.utilr   r	   r  r
   r  r5   rR   os.pathr   r  rE  r"  textwrapr   rm  r>  r  r+   idlelib.colorizerr   idlelib.configr   idlelib.delegatorr   r  r   r   idlelib.editorr   r   idlelib.filelistr   idlelib.outwinr   r   r   r?  r   r   r   idlelib.undor   r  r=  r  eofr;  r  	NameErrorr   r(   r*   r.   
checkcacher=   r?   r   r   r   r   	RPCClientr   r	  r  r   r%  r:  r(  r   r/   r'   <module>rn     s   z%([[%<CKK!" <<7*O  '   	  # 	         , # '   6 % '   G G & 	
 CDHDH "  )  +/2;2F2F( 5	 {", {"|h (
2^ 
2/M /D1	 1#-- m(0 m(`c	,l c	,L;4	lnb zF  w4  	 9?B~~O
Q-b  		s   F4 )G 4$GG%$G%