python (3.12.0)

(root)/
lib/
python3.12/
idlelib/
__pycache__/
pyshell.cpython-312.opt-2.pyc

̑eddlZedk(rejdejd<	ddlejdk(r(	ddl	Z	dZ
e	jd	je
dd
lmZddlmZddlZddlZddlZddlZddlmZddlZddlZddlZdd
lmZddlZddlZddlZddlZddl m!Z!ddl"m#Z#ddl$m%Z%ddl&m'Z'ddl&m(Z(ddl)m*Z*m+Z+ddl,m-Z-ddl.m/Z/ddl&m0Z0ddl&m1Z1ddl2m3Z3m4Z4m5Z5ddl6m7Z7da8dZ9dZ:	dZ;e;e<_;e;e=_;eja?	d5dZ@daAdZBeBddejfd ZDeDe_CGd!d"e*ZEGd#d$e-ZFGd%d&e!ZGGd'd(e7ZHGd)d*e%ZIGd+d,e1jZKd-ZLGd.d/eZMGd0d1e/ZNd2ZOd3ZPd4ZQedk(reQeBdy#e$redejedwxYw#ee
ef$rYwxYw#e>$rYwxYw)6N__main__zidlelib.pyshell)*zJ** IDLE can't import Tkinter.
Your Python may not be configured for Tk. **filewin32shcore)
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		|t}	|jt||||||jdy#ttf$rYywxYw)N)linez>>> )warning_streamwriterAttributeErrorOSError)messagecategoryfilenamelinenorrs      C/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/idlelib/pyshell.pyidle_showwarningr)Is\|


%8V$@	A

6G$

s0<A
Ac	|r't tjatt_yyttt_dayyN)_warnings_showwarningwarningsshowwarningr))captures r(capture_warningsr0\sDD ($,$8$8!#3H )!,#8H $(!-Tc	tj}i}t|D]%}|dd|ddzdk(s|j|||<'|||j	|yNrz<>)	linecachecachelistpopupdate)r&orig_checkcacher6savekeys     r(extended_linecache_checkcacher=ksj
OOE
DE{'r7SX%		#DI'H	LLr1c^eZdZ	dZgdZddZdZddZddZdZ	d	Z
d
ZdZdZ
d
Zy)PyShellEditorWindowcrg|_tj|g||jj	d|j
|jj	d|j|jj	d|jjtjjtjd|_|jj |fd}|jj#||jj$r|j'|j)y)N<<set-breakpoint-here>><<clear-breakpoint-here>>z<<open-python-shell>>zbreakpoints.lstc2|j|yr+)restore_file_breaks)old_hookselfs  r(filename_changed_hookz;PyShellEditorWindow.__init__.<locals>.filename_changed_hooks$$&Jr1)breakpointsr__init__textbindset_breakpoint_hereclear_breakpoint_hereflist
open_shellospathjoinruserdirbreakpointPathiofilename_change_hookset_filename_change_hookr&rDcolor_breakpoint_text)rFargsrGs   r(rIzPyShellEditorWindow.__init__sd*T*		0$2J2JK		2D4N4NO		.

0E0EF!ggll  "35,077+G+G'+		
(()>?77$$&""$r1))Cutz<<cut>>rmenu_check_cut)Copyz<<copy>>rmenu_check_copy)Pastez	<<paste>>rmenu_check_paste)NNN)zSet BreakpointrAN)zClear BreakpointrBNc	|jy|r+tj}tj|d}nddd}|jjd|y)Nbreak)
foreground
backgroundBREAK)rUrCurrentThemeGetHighlightrJ
tag_config)rFcolorthemecfgs    r(rXz)PyShellEditorWindow.color_breakpoint_textsR677?))+E''w7C!#26C		Wc*r1c|j}|jj}|jdd|zd|dzz	|jj|	|jjjj}|j||y#t$r|jj|YdwxYw#YyxYw)Nrez%d.0r)
rJrUr&tag_addrHindex
ValueErrorappendrNpyshellinterprrL)rFr'rJr&debugs     r(set_breakpointz"PyShellEditorWindow.set_breakpointsyy77##Wfvov/BC	,""6*	JJ&&--66E%%h7		,##F+	,
	sB<C$C?CCNc|j}|jj}|s|jyt	t|j
d}|j|y)Ninsert)rJrUr&bellintfloatrnrt)rFeventrJr&r's     r(rLz'PyShellEditorWindow.set_breakpoint_heresOyy77##IIKU4::h/01F#r1c|j}|jj}|s|jyt	t|j
d}	|jj||jddd	|jjjj}|j||y#YUxYw#YyxYw)Nrvreinsert linestartzinsert lineend +1char)rJrUr&rwrxryrnrHremove
tag_removerNrqrrrrM)rFrzrJr&r'rss      r(rMz)PyShellEditorWindow.clear_breakpoint_heresyy77##IIKU4::h/01	##F+	
!3/	1	JJ&&--66E''&9
		sC	<C
C

CcJ|jr|j}|jj}|s|j	yg|_|jddt	|jjjj}|j|yy#YyxYw)Nre1.0)rHrJrUr&rwr~ENDrNrqrrrclear_file_breaks)rFrJr&rss    r(rz%PyShellEditorWindow.clear_file_breakss99Dww''H		!DOOGUC0


**11::''1
s!;BB"c	|j}|jj}	t|j5}|j}ddd	t|jd5}D](}|j|dzr|j|*|j|j}|r#|j|dzt|zdzdddy#1swYxYw#t$rg}YwxYw#1swYyxYw#t$re}t|jddsDd|j_
tjddt|z|j 	Yd}~yYd}~yd}~wwxYw)
Nw=
breakpoint_error_displayedFTz
IDLE Errorz$Unable to update breakpoint list:
%s)titler$parent)rHrUr&openrT	readlinesr#
startswithr!update_breakpointsstrgetattrrootrr
	showerrorrJ)rFbreaksr&fplinesnew_filererrs        r(store_file_breaksz%PyShellEditorWindow.store_file_breakssc-"!!77##	d))*
'b
'	&d))3/
H8!-D??8c>: t,-'')))NN8c>CK#?$#FG
H
H
'
'	E	
H
H	&499&BEJ7;		4$$<Cc(#99&&K	&sfC.C"C.D*C?AC?D"C+'C..C<;C<?DDD	E9AE44E9c|jj|jy|jj}|ytj
j
|jr}t|j5}|j}dddD]I}|j|dzst|t|dzd}|D]}|j|Kyy#1swYYxYw)Nrr)rJr9rUr&rPrQisfilerTrrrevallenrt)rFr&rrrbreakpoint_linenumbersbreakpoint_linenumbers       r(rDz'PyShellEditorWindow.restore_file_breakss		77?77##
77>>$--.d))*
'b
'
C??8c>2-1$s8}Q7G2H-I*1GC-++,ABC
C/
'
's?C((C1cp	|j}|jd}|j|}||_y)Nre)rJ
tag_rangesranges_to_linenumbersrH)rFrJrangeslinenumber_lists    r(rz&PyShellEditorWindow.update_breakpoints"s4=yy)44V<*r1cg}tdt|dD]i}tt||j}tt||dzj}||ksN|j||dz
}||krk|S)Nrr)rangerrxrystringrp)rFrrrnr'ends      r(rz)PyShellEditorWindow.ranges_to_linenumbers)s1c&k1-	Eve}3345FeF57O2234C3,V$!3,	r1cP	|jtj|yr+)rr_closerFs r(rzPyShellEditorWindow._close:sA D!r1)Tr+)__name__
__module____qualname__rIrmenu_specsrXrtrLrMrrrDrrrr1r(r?r?sE<%(K
+$&
(&TC"+""r1r?ceZdZ	eZdZddZy)PyShellFileListNc|jr0|jjj|jSt||_|jr|jj	sy|jSr+)rqtopwakeupPyShellbeginrFrzs  r(rOzPyShellFileList.open_shellIs\<<LL##%||	#4=DL||||))+||r1r+)rrrr?rrqrOrr1r(rr@s>'LGr1rceZdZ	dZdZy)ModifiedColorDelegatorcz|jddd|jdddtj|y)NTODOriomarkSYNC)r~rmrrecolorize_mainrs r(rz&ModifiedColorDelegator.recolorize_mainVs0x0VUH-&&t,r1cL|jD]}|j|ddy)Nrr)tagdefsr~)rFtags  r(removecolorsz#ModifiedColorDelegator.removecolors[s%<<	2COOC51	2r1N)rrrrrrr1r(rrTs>-
2r1rc0eZdZ	ddZddZfdZxZS)ModifiedUndoDelegatorc	|jj|ddr|jjy	t	j
||||y#t$rY$wxYwN<r)delegatecomparerwTclErrorrrvrFrncharstagss    r(rvzModifiedUndoDelegator.insertcs_	}}$$UC:

""$;
	T5%6		s7A	A A c	|jj|ddr|jjy	t	j
|||y#t$rY#wxYwr)rrrwrrdelete)rFindex1index2s   r(rzModifiedUndoDelegator.deletels]	}}$$VS(;

""$<
	T662		s7A	AAc|jjfd|j_	t|
||j_y#|j_wxYw)Nc||dSNstdinr)rnrorig_inserts  r(<lambda>z2ModifiedUndoDelegator.undo_event.<locals>.<lambda>|sUE7!Cr1)rrvsuper
undo_event)rFrzr	__class__s  @r(rz ModifiedUndoDelegator.undo_eventusN
mm**C	


	/Gu%#.DMM ;DMM sAA"r+)rrrrvrr
__classcell__rs@r(rrasA73//r1rceZdZ	ddZy)UserInputTaggingDelegatorNcF|d}|jj|||yr)rrvrs    r(rvz UserInputTaggingDelegator.inserts"<D

UE40r1r+)rrrrvrr1r(rrs
81r1rceZdZdZy)MyRPCClientc	tr+)EOFErrorrs r(
handle_EOFzMyRPCClient.handle_EOFs
:r1N)rrrrrr1r(rrsr1rc	d|xsdd}|t|k\r,t|t|z
d\}}||zdz||dzS|ddS)Nz= RESTART: Shellz =rr)rdivmod)widthr&rdivmods     r(restart_linersk

+G,B
/CC5#c(?Q/Ss7C-c#gY//3Bxr1ceZdZdZdZdZdZdZdZdZ	d dZ
dZdZd	Z
d
Zd!dZdZdZdZd
ZdZdZdZdZdZd"dZdZdZdZd"dZdZdZdZ dZ!dZ"dZ#dZ$dZ%y)#ModifiedInterpreterc||_tjdj}t	j
||d|_d|_t|_	|jjj|_
y)Nr)localsF)	tkconsolesysmodules__dict__rrI
restartingsubprocess_arglistPORTportcompilecompilerflagsoriginal_compiler_flags)rFrrs   r(rIzModifiedInterpreter.__init__s["Z(11''V<"&	'+||'<'<'B'B$r1Nc|j|j|_tj|j|_yr+)rbuild_subprocess_arglist
subprocessPopen
rpcsubprocrs r(spawn_subprocessz$ModifiedInterpreter.spawn_subprocesss7""*&*&C&C&ED#$**4+B+BCr1ctjDcgc]}d|z	}}tjddddd}d|d	}tjg|zd
|t|jgzScc}w)Nz-WmainGeneralzdelete-exitfuncFbool)defaulttypez#__import__('idlelib.run').run.main()-c)rwarnoptionsr	GetOption
executablerr)rFsr	del_exitfcommands     r(rz,ModifiedInterpreter.build_subprocess_arglistsw #/!TAX//&&vy:K/46C	7	}AF!#tWc$))n&EEE
0sA.cDt|jf}tdD])}tj|	t||_n|jy|jjjd|_tdk7rC|jjjtjtjd|j!|jjj#d	|jj%|jj+d|j,|jj+d|j,j.|jj+d|j,j0|jj+d|j,j2|jj+d	|j,j4|jj+d
t6|jj+d||j9d
|j;|jS#t$rYawxYw#t&$r|j)YywxYw)Nrr
consolerstdoutstderrrNr5rrTwith_cwd)HOSTrrtimesleeprrpccltr#display_port_binding_errorlistening_sockgetsocknamer
setsockoptsocket
SOL_SOCKETSO_REUSEADDRr
settimeoutacceptTimeoutErrordisplay_no_subprocess_errorregisterrrrrrNr5
transfer_pathpoll_subprocess)rFaddris   r(start_subprocessz$ModifiedInterpreter.start_subprocesssdii q		AJJqM
)$/			
++-KK..::<Q?	19

KK&&11&2C2C+1+>+>
C	
""--b1	KK 	
Y7Wdnn&:&:;Xt~~'<'<=Xt~~'<'<=Wdnn&:&:;[)4Xt,D){{C

*	,,.	s#I3	J3	J?JJJc(|jr|jSd|_|j}|r 	tj|j|jj|j
|j}|j}d|_|j	|jj|j||j|jj!dd|j#d|j#t%|j&||jj)dd|jj+dd|s|j-|r/tj.|j|j1|j2|j4j6_d|_|jS#YxYw#t$r|jYywxYw)	NTFrrend-1crrestartleft)rrgetdebuggerrclose_subprocess_debuggercloseterminate_subprocessr	executingrr%r&r'r)
stop_readlinerJrr!rrmark_setmark_gravity
showpromptrestart_subprocess_debuggerload_breakpointsrrrr)rFrr&rsr
was_executings      r(restart_subprocessz&ModifiedInterpreter.restart_subprocesss??;;  "
44T[[A	
!!#..))
!	KK 	
H-Hh/

d

l7==(;<i2!!)V4 224;;?""$&*&B&B#{{A
	,,.	sG-,G5-G25HHc@|jjdddiy)Nexecinterrupt_the_serverr)r
remotecallrs r(__request_interruptz'ModifiedInterpreter.__request_interruptsv'=r2Fr1c`tj|jjy)N)target)	threadingThread'_ModifiedInterpreter__request_interruptstartrs r(interrupt_subprocessz(ModifiedInterpreter.interrupt_subprocesss 8 89??Ar1c|j/|jjj|j	|jj
j
	|jj
|jd|j_	d|_y#t$rYOwxYw#t$rYCwxYwNF)
_afteridrrJafter_cancelrrr4r"r5r6rs r(kill_subprocessz#ModifiedInterpreter.kill_subprocesss==$NN,,T]];	KK&&,,.	KK	
!!##( 				s#$B%"B4%	B10B14	C?Cc		|jj	|jjy#t$rYywxYw#t$rYywxYwr+)rkillwaitr#rs r(r5z(ModifiedInterpreter.terminate_subprocess+sT,		OO  "

$$&


		s A9	AA	AAc|r#dg}|jtjntj}|jdj	|y)NrbzTif 1:
        import sys as _sys
        _sys.path = {!r}
        del _sys
        
)extendrrQ
runcommandformat)rFrrQs   r(r)z!ModifiedInterpreter.transfer_path8sA4DKK!88DfTl		r1cx|j}|y	|j|jd}|r|jjd|_|\}}|jj}|dk(r|ytt||nb|dk(r,|jjdrB|jn1|dk(r,d}t||tj t|||	|jj#|jjsJ|jj&j)|jj*|j,|_yy#ttt
f$r.|jjrYyd}|jY{wxYw#t$$rYwxYw)	Ng?)rROKr	EXCEPTION<<toggle-jit-stack-viewer>>ERRORz/pyshell.ModifiedInterpreter: Subprocess ERROR:
)rpollresponse
active_seqrr#KeyboardInterruptrclosingr>resetoutputrprintreprgetvarremote_stack_viewerr
__stderr__endexecutingr"rJafterpollintervalr*rM)rFcltresponsehowwhatrerrmsgs       r(r*z#ModifiedInterpreter.poll_subprocessGsykk;	&''d'CHNN&&("DO ICnn,,Gd{#$t*73#>>(()FG,,.Kfd8fd1
++-~~%% NN//55++T-A-ACDM&9'#45	&~~%%H##%
	&2"

s)E(-F-(*F*F*)F*-	F98F9c||_yr+r)rFrs  r(setdebuggerzModifiedInterpreter.setdebuggeros	 
r1c|jSr+rrs r(r2zModifiedInterpreter.getdebuggerrs}}r1cf	|jjjd|jy)Ni,)rrJrgrdrs r(open_remote_stack_viewerz,ModifiedInterpreter.open_remote_stack_viewerus,		
!!#t'?'?@r1cddlm}|jjdddi}|%|jj
j
y|j|j|}ddlm	}m
}t|jj
}tj}tj|dd}|||d	}	|	jj!d
d||	j"d|}
|
j%y)
Nr)
debugobj_rr@stackviewer)rN)ScrolledCanvasTreeNodenormalrd)bghighlightthicknessrboth)expandfill)idlelibrtrremotequeuerrrwStubObjectTreeItemidlelib.treervrwToplevelrrfrgframepackcanvasr|)rFrtoiditemrvrwrrjrdscnodes           r(rdz'ModifiedInterpreter.remote_stack_viewers&kk%%fmZL;NN$$&,,T[[#>9t~~**+%%'**5(;LI

CJ1
E


QV
,		4.
r1rcL	|j|}|j||yr+)stuffsourceexecfilerFsourcer&s   r(
execsourcezModifiedInterpreter.execsources#;##F+

h'r1c	|]tj|5}|j}tr)dtj
j
|d|zdz}ddd	t||d}|j|y#1swY)xYw#ttf$rn|jjtd|jjtj |||jj#YywxYw)Nz__file__ = r'''z'''
z
del __file__r@zB*** Error in script or command!
Traceback (most recent call last):r)tokenizerreaduse_subprocessrPrQabspathrruncode
OverflowErrorSyntaxErrorrr`rarrshowsyntaxerrorr:)rFr&rrcodes     r(rzModifiedInterpreter.execfiles">x(
;B! /0I/J%P &')9:F
;

	68V4D
LL
;
;{+	(NN&&(6~~,,
.
#224BNN%%'
	(sAB"
B
B

A:D
	D
cT	|j|}tj|||Sr+)rr	runsourcers   r(rzModifiedInterpreter.runsources,L##F+
&//fhGGr1c	d|jz}|jdz|_|jd}t|dzd||ftj|<|S)Nz<pyshell#%d>rrr)gidsplitrr5r6)rFrr&rs    r(rzModifiedInterpreter.stuffsourcesT,!DHH,88a<T"$'KM1eX$E	!r1cF	|jdj|y)Na*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
            
)rUrVrFr&s  r(prepend_syspathz#ModifiedInterpreter.prepend_syspaths"H&"	$r1c	|j}|j}|jdddtj\}}}t|ddxs|xsd}t|ddxsd}t|d	dxsd
}	|	d
k(r|dz
}|dk(r	d|	dz
z}
n
d|dz
|	dz
fz}
|j
||
|j|jd
|z|jy)Nr[rrmsgrbz<no detail available>r'roffsetrziomark + %d charsz&iomark linestart + %d lines + %d charszSyntaxError: %s
)
rrJr~rexc_inforcolorize_syntax_errorr`r!r:)rFr&rrJrvaluetbrr'rposs           r(rz#ModifiedInterpreter.showsyntaxerrors	NN	~~.,,.eReUB'K5K4K"-2"-2Q;aKFQ;%2C:!8VAX&'C''c2

&,-r1c	|jj|jtj||jjdr|jj
yy)NrZ)rr`checklinecacher
showtracebackrcopen_stack_viewerrs r(rz!ModifiedInterpreter.showtracebacksX;""$,,T2>>  !>?NN,,.@r1ctj}t|jD]}|dd|ddzdk7s||=yr3)r5r6r7keys)rFcr<s   r(rz"ModifiedInterpreter.checklinecachesDOO>	C2AwRS!T)cF	r1c	|jjr|jy|jr |jj	dd|fiyt||jy)Nrr@rr)rr6display_executing_dialogrrr@r)rFrs  r(rUzModifiedInterpreter.runcommandsZ4>>##))+;;KK##FIwC
t{{#r1c	|jjr|j|j|j}	|jj|s1|j%|jjdd|fi|_n6|r|j||jnt||jt$s	|jj+yy#t$rY|jjs?tjddd|jj r|j#nYt$rLt'd|jj(|j#|jj+nY|jj,r3d	|j_t'd
|jj(n|j#Y3xYw#t.$rYywxYw#t$s+	|jj+w#t.$rYwwxYwwxYw)Nr@rzExit?zDo you want to exit altogether?yesrrz IDLE internal error in runcode()rFr^)rr6r>rrbeginexecutingr
asyncqueuer]runrr@
SystemExitr_r
askyesnorJrrrarrfcanceledr")rFrrs   r(rzModifiedInterpreter.runcodes$>>####%==&	NN))+ 7"&++"8"89=#ET4;;/T4;;'4"NN//1"3	>>))&&5!>>..	0
&&()	)8>>002""$++->>**.3DNN+-DNN4I4IJ&&(
&"NN//1%"s]BC+G>+AG;
H
B,G;8H
>	H
	H

IH0/I0	H<9I;H<<IcN	|jjj|Sr+)rrr!)rFrs  r(r!zModifiedInterpreter.write-s $~~$$**1--r1c\tjdd|jjy)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
rrrJrs r(rz.ModifiedInterpreter.display_port_binding_error1s' 
/>>&&	(r1c\tjdd|jjy)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(r'z/ModifiedInterpreter.display_no_subprocess_error<s()
J>>&&	(r1c\tjdd|jjy)NzAlready executingzYThe Python Shell window is already executing a command; please wait until it is finished.rrrs r(rz,ModifiedInterpreter.display_executing_dialogDs%
0>>&&		(r1)Frb)Fr+)&rrrrIrMrrrrr-r>rHrJrOr5r)r]r*rror2rrrdrrrrrrrrrrUrr!rr'rrr1r(rrsCH
FJD

F)V*XGB
J$CLH!"C(
(H
$4/
,\.	(((r1rc	PeZdZddlmZdezZeZe	Z
gdZejdgzZ
deeej"de
zZe
j'ed[d	Zd
ZddlmZddlmZd9d
ZfdZfdZdZdZdZd9dZ d	Z!d	Z"d	Z#d	Z$d	Z%d	Z&dZ'dZ(d9dZ)dZ*d9dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2d Z3d!Z4d"Z5d#Z6d$Z7d%Z8d&Z9d9d'Z:d(Z;d)Z<d*Z=d+Z>e?jd,ZAd-ZBd9d.ZCd9d/ZDd9d0ZEd1ZFd2ZGd3ZHd:d4ZIfd5ZJfd6ZKd9d7ZLd8ZMxZNS);rr)SqueezerzIDLE Shell ))r_File)edit_Edit)rs_Debug)options_Options)window_Window)help_Help)Squeeze<<squeeze-current-text>>rc|ddk7S)Nrr\r)
rmenu_items r(rzPyShell.<lambda>ds:a=F2r1)zCopy with prompts<<copy-with-prompts>>r]Fr)History)ShellSidebarctr)|j}|dddk7r|jddt||_|0t}t
||jt|}d|_	tj||ddd|_d|_
ttdrtj nd|_|j"j%d	d
|_|j"|_|j*}|j-d|j/d
|j0|j/d|j2|j/d|j4|j/d|j6|j/d|j8|j/d|j:|j/d|j<|j/d|j>tr8|j/d|j@|j/d|jB|jE||_#|j/d|jHtjJ|_&tjN|_(tjR|_*ddl+m,}t[|d|j\|j^|_)ta|d|j\|j^|_%ta|d|j\d|_'ta|d|j\|j^|_1ts?|jJt_%|jNt_'|jRt_)	ddl2}|jf|_4|jm|j*|_7d|_8|js||_	|jtjvj|j*_|jtjyt{y#tjjt_'xYw)Nrrshell)rShe_llFps1z>>>
rr4char)wrapz<<newline-and-indent>>z<<plain-newline-and-indent>>z<<interrupt-execution>>z<<end-of-file>>z<<open-stack-viewer>><<toggle-debugger>>rZrz<<view-restart>>z<<restart-shell>>r)iomenurrrbackslashreplacer2)>r
menu_specsrvrrrTkrwithdrawr
shell_sidebarrrIusetabsindentwidthhasattrrrsys_ps1rprompt_last_linepromptrJ	configurerKenter_callbacklinefeed_callbackcancel_callbackeof_callbackrtoggle_debuggertoggle_jit_stack_viewercopy_with_prompts_callbackview_restart_mark
restart_shellrsqueezersqueeze_current_text_eventrsave_stdoutrsave_stderrr
save_stdinr~rrencodingerrorsrrpydoc
plainpagerpagerrerhistoryrhrperrinsertfilterr)rFrNmsrrJrrs       r(rIzPyShell.__init__rs*B!uQx7"		!01)$/=4D$MMO#D)E!dE46")#u"5sww7 $ 2 24 8 <llyy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**Qcpt||j|jjyyr+)r	ResetFontrupdate_fontrFrs r(rzPyShell.ResetFonts1
)**,*r1ct|tj}dddtj|dtj|dtj|dd}|jD]"\}}|jj|fi|$|j|jjyy)N)rdrcrrrx)rrrr)
rResetColorizerrrfrgitemsrJ
tag_configurer
update_colors)rFrj
tag_colorsrtag_colors_configrs     r(rzPyShell.ResetColorizers
 %%'"&d;))%:))%:**5(;	

'1&6&6&8	>"C"#DII##C=+<=	>),,.*r1cFtj|jdy)Nr)insert_tagsra)rrJrs  r(
replace_eventzPyShell.replace_events		w7r1c.tjdS)NT)
shell_only)r
GetExtensionsrs r(get_standard_extension_namesz$PyShell.get_standard_extension_namess%%66r1cp	|jj||}ttt	|tt	|}|Dcgc]'}|j
jj|)}}djdt||jDdzScc}w)Nrc38K|]\}}||n|d|yw)N r).0rrs   r(	<genexpr>z*PyShell.get_prompt_text.<locals>.<genexpr>s0
ND6(!D6(::
s)
rJgetrrxryrline_promptsrRzip
splitlines)rFfirstlastrJlineno_ranger'promptss       r(get_prompt_textzPyShell.get_prompt_textsDyy}}UD)ed'

++//7

yy
 #GT__-> ?


		
s,B3c	|j}|jd}|y|jd}|ddk7r|jd}|j|j||}|j	|y)Nzsel.first linestartsel.lastr40zsel.last+1line linestart)rJrnclipboard_clearr!clipboard_append)rFrzrJselfirstsellastprompt_texts      r(rz"PyShell.copy_with_prompts_callbacks	yy::34**Z(2;#jj!;<G**8W=k*r1c|ayr+r )rFstreams  r(set_warning_streamzPyShell.set_warning_stream	sr1ctSr+r+rs r(get_warning_streamzPyShell.get_warning_stream
sr1c|jr3tjdd|j|j	y|j
j
}|r|jy|jy)NzDon't debug nowz*You can only toggle the debugger when idlerra)	r6r
rrJset_debugger_indicatorrrr2close_debugger
open_debugger)rFrzdbs   r(rzPyShell.toggle_debuggersb>>  !2<yy
"
'')((*B##%""$r1c`|jj}|jd|y)Nr)rrr2setvarrFr4s  r(r1zPyShell.set_debugger_indicators'
[[
$
$
&)2v:6r1cyr+rrs  r(rzPyShell.toggle_jit_stack_viewer"sr1c|jj}|r|jjd|j|jjr)tj|jj|j|jjd|j|_|j|jy)Nz[DEBUG OFF]
)rrr2ror4rrclose_remote_debuggerr`rr!rrr:r1r7s  r(r2zPyShell.close_debugger%s
[[
$
$
&
KK##D)HHJ{{!!001C1CDLL/,,DKOO##%r1cn|jjr+tj|jj|}nt	j
|}|jj
||jd|jz|_	|j|jy)Nz[DEBUG ON]
)rrrrstart_remote_debuggerrDebuggerror<rrr:r1)rFdbg_guis  r(r3zPyShell.open_debugger2s;; 66t{{7I7I;?AG''-G(  "$t||3##%r1cJ|jrdnd}|jdd|y)Ndisabledrxrsz*tack*iewer)r6update_menu_state)rFstates  r(debug_menu_postcommandzPyShell.debug_menu_postcommand>s!"nn
(w
u=r1c4	|jd|_yNT)r`r6rs r(rzPyShell.beginexecutingBs(r1cB	d|_d|_|jyrL)r6rr:rs r(rfzPyShell.endexecutingGs(
r1c	|jr(tjddd|j}|dury|j	d|_d|_tj|S)NzKill?z7Your program is still running!
 Do you want to kill it?okrFcancelT)	r6r
askokcancelrJr7rr_rr4)rFrjs  r(r4z
PyShell.closeMsd%>>!--Jyy	"H
5 
!!$''r1cZ	|jtr|jj|jt
_|jt
_|jt
_
d|_d|_d|j_
d|_tj |yr+)r2rrrrOrrrrrrrrrNrqrrrrs r(rzPyShell._close\sxOKK'')%%
%%
OO	!

D!r1c	yrErrs  r(ispythonsourcezPyShell.ispythonsourcelsBr1c|jSr+)shell_titlers r(short_titlezPyShell.short_titlepsr1zHType "help", "copyright", "credits" or "license()" for more information.c
|jjdd|jtr/d}|jj}|s,|j
yd}tjt_|jdtjdtjd|jd||jj|jd	dl}d
|_d|_y
)NrrvrbFz==== 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)rJr8r`rrrr-r4rdisplayhookrr!versionplatform	COPYRIGHTfocus_forcer:tkinter_support_default_root
_default_root)rFnosubclientrWs    r(rz
PyShell.beginvs		8X.E[[113F

'E"ooCO

KKt~~uF	G		(,% $r1c`|jsyd|_|jjyrE)reading_stop_readline_flagrquitrs r(r7zPyShell.stop_readlines!||#' 

r1c|j}	d|_|jj||_|jrd|_y|jjdd}t
|dk(rd}|j|jrd|_tst|jr	d|_d}|S#||_wxYw)NTFrbrr/rr)r]rmainloopr^rJrrr`rrr^	endoffile)rFr;rs   r(readlinezPyShell.readlines||	 DLHHDL##',D$yy}}Xx0t9>D==!DM!''>>"DND DLs!B<<	CcyrErrs r(isattyzPyShell.isattysr1cD	|jjdddry	|jsH|js<|j	|j
j
d|jyd|_d|_	|jre|j
jrO|j
jr|j
jn|j
j|jr|jjy#YxYw)N	sel.firstz!=r#zKeyboardInterrupt
raFT)rJrr6r]r`rrr!r:rbrrr2r>rJrr_rs  r(rzPyShell.cancel_callbacks	yy  dJ?@$,,KK34OO
NNt{{11{{&&(..0002<<HHMMO!	sDDcV|jr
|jsy|jjdddr|jjdddsy|js!|j	|jyd|_d|_|jjy)Nrz==rvr/FTra)
r6r]rJrr`r4rrbrr_rs  r(rzPyShell.eof_callbacks>>$,,		!!(D(;		!!(D(;~~JJL
"DM!DNHHMMOr1c|jr8|jjdd|jjdy|j	|y)Nrvrra)r]rJrvseenewline_and_indent_eventrs  r(rzPyShell.linefeed_callbacksE<<IIXt,IIMM(#
))%0r1cr	|jr
|jsy	|jjdd}|r0|jj	dddr|j||y|jj	dddr|jj
d	d}|r#|jj	dd|d
rd|jjdvr|jj
dd}|r-|jj	|d
d|d
r
|d
|d
f}|jjdd}|rI|jj	|d
d|d
r&|d
|jj|d
dzf}|j|jj|d
|d
|y|jjd	d}|r|jj	dd|d
r|jjdd}|rI|jj	|d
d|d
r&|d
|jj|d
dzf}|j|jj|d
|d
|y|jjdd}|rP|jj	|d
ddr0|j|jj|d
d|y|j|jjdd|y|jj	dddr|jjdd|jjdd}|r,|js|jjdd|jj	dddr|j|y|jjdd|jr8|jjdd|jjdn|j||jj!|jr|j"j%y|j'y#YMxYw)Nrgr#z<=rrarvriomark linestartrrrz>=rz+1czinsert lineendr|r/zend-1c linestartr)r6r]rJrrrecall
tag_prevrange	tag_names
tag_nextrangernr8striprrkrvrjupdate_idletasksrr_runit)	rFrzselprev	prev_cons	next_consnextindicesrs	         r(rzPyShell.enter_callbacks>>$,,	))--Z8C99$$Zx@KKU+"99Xs,>?
99**7H=DII%%hT!W=TYY%8%8%BB II33IxH	!2!29Q<tAw!O%aL$q'2D II33IxH	!2!29Q<d1g!N GTYY__Yq\E5I%JKDDIIMM$q'47;UC99**7H=D		))*:D$q'J II33I?OP	!2!29Q<d1g!N GTYY__Yq\E5I%JKDDIIMM$q'47;UCii--i9KLGyy  T3EFDIIMM'!*6FGODIIMM*<>NOQVW99XsH5IIx2
IIMM(H-QWWYIIXx099Xs,>?))%0		8X.<<IIXt,IIMM(#))%0		""$<<HHMMO
JJLE	sA
R11R6ctjdd|}tjdd|}|jd}|jj		|jjddd|jj
dd	|jjd
d}|jjdr-|j||jjd
d}|jjd|dj|jt|d
kDrtjd|dj!d}tjd|j!d}|d
dD]\}|j#|r||t|dz}|jjdd|jz|j^|jj%d|jj'y#|jj%d|jj'wxYw)Nz^\s*\nrbz\n\s*$rrurrrvr/r|:rrz	^([ \t]*))resubrrJundo_block_startr~r8rrstripendswithrkrvrruser_input_insert_tagsrsearchgrouprrjundo_block_stop)rFrrzrprefixorig_base_indentnew_base_indentrs        r(rnzPyShell.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!!"IBD'78.c:J6K6L1MMII$$Xtdkkm/C%)%@%@B	B
IIMM(#II%%'
IIMM(#II%%'s
FH))7I z[ \t]*(\n[ \t]*)?\Zc|jjd}|jjdd}|jj	d|}|j
j
|}|s_|jj|dk(r&|jj|j||jjyy)Nend-2crr/rbr)rJrnr_last_newline_rer~rrrr~rrupdate_sidebar)rFindex_beforerinput_is_completes    r(rtz
PyShell.runitJsyyx0yy}}Xx0$$((T2 KK11$7 yy}}\*d2		$$T%@%@,O--/!r1c|jjr|jjSddlm}	||j
tj|jy#tjdd|jYyxYw)Nr)StackBrowserzNo stack tracez:There is no stack trace yet.
(sys.last_exc is not defined)r)rrrrdidlelib.stackviewerrrrlast_excrNr
rrJ)rFrzrs   r(rzPyShell.open_stack_viewerVsp;;;;22444	"CLL$**=	"  !10yy
"s,A%%$Bcp|jjd|jjdy)Nrr0)rJrjrs  r(rzPyShell.view_restart_markds"		

h		

i r1c>	|jjdy)NTr)rrr>rs  r(rzPyShell.restart_shellhs0&&&5r1c|j|j}|jr4|j|jr|dt	|j}|j
j
dd|jj||jj|j
jdd|j|jjy)Nrz	iomark-1crvr/)r`rrrrrJrmrr!rrr8set_line_and_columnrU
reset_undo)rFrs  r(r:zPyShell.showpromptls<<FOODLL9/c$,,//0F		)[16"))+		8X.  "r1c|jjj}t|dd}dj	|j|}|j
ds|dz
}|jjjd|dy)NT)rtabsizeexpand_tabsrrmr)
rrrrr
rRrrrbottomrv)rFrrwrapperwrapped_msgs     r(show_warningzPyShell.show_warningzso%%++E1$GiiS 12##D)4K1;Ir1c|jjdd}|jr|jj||jjddk7r|jj	dd|jjdd|j
|jjy)Nrr/rr)	rJrrstorervr8rctipremove_calltip_window)rFrs  r(r`zPyShell.resetoutputsx2<<LLv&99=="d*IIXt,		8X.  "		'')r1c	|jjddtj|||d}|jjdd|jrd|_t
st|S#xYw)Nrrightr1F)rJr9rr!rrr^)rFrrcounts    r(r!z
PyShell.writesm	II""8W5 &&tQh?EII""8V4==!DM!''	sAA33A6c~	|jjdddry	t|S#t$rYywxYw)Nrgrrr@)rJrrrr[rs r(r[zPyShell.rmenu_check_cutsJ	yy  c8<!=w&((		s0	<<c\|jjdddryt|
S)Nrvrrr@)rJrrr_rs r(r_zPyShell.rmenu_check_pastes*99Xc(3w(**r1cl|jj|jjyr+)rsqueeze_current_textrrrs  r(rz"PyShell.squeeze_current_text_events$

**,))+r1c8|jjyr+)rr)rFrnrJrs    r(on_squeezed_expandzPyShell.on_squeezed_expands))+r1r+)r)Orrridlelib.squeezerrrrOrrrrrrrrr7	itertools	takewhile_idxrvallow_line_numbersridlelib.historyridlelib.sidebarrrIrrrrr!rr]r6rrbr_r^r-r/rr1rr2r3rCrrfr4rrMrPrUrr7rcrerrrrrnr}rrrtrrrr:rr`r!r[r_rrrrs@r(rrLs)."22K,N)MJ**/.K
s4+	++2KADt23	
$(,L;\-/ 7"+(GIHIG %7
&
&>

("  U4.,
M^(8"rzz"89
0!6J*)+
,,r1rc
	|jdk(r.dD](}|j|dd|j|dz*yy)Nx11)TextEntrySpinboxz	<<Paste>>z%catch {%W delete sel.first sel.last}
)_windowingsystem
bind_class)rclss  r(
fix_x11_pastersO<%-	;COO8[9:
;	;&r1a
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	ddl}ddlm}ddlm}ddlm}t
ddad}d}d}d}d}d}		|jtjddd\}
}
D]\}
}|
d
k(r|}d}|
dk(rd}d}|
dk(rd}|
dk(r7tjj!ttj|
dk(rd}|
dk(rtdtjda|
dk(rD|}t"j$j'|rn td|tjd}|
dk(rd}	d}|
dk(s|t(_d}r(|ddk(r tj,j/}d}t1t3tj$D]C}t"j$j5tj$|tj$|<E|r|ddk(rdg|ddzt_	n|rd
g|zt_	n|r|g|zt_	n|rd}g}|D]0}|j7t"j$j9|2|D]T}t"j$j5|}|tj$vs5tj$j;d|VnFt#j<}|tj$vr tj$j;d|t?j@dddd}|xs|}|xs|}tr|s
tCtEd a#tFjIdd!l%m&}|tFt"j$jOt"j$j9tPd"}|d#k(r7t"j$jO|d$}tFjS|%n|jUsxtVd&k\rd'}d(}nd)}d*}|Dcgc]'}t"j$jO|d+||fz)}}|Dcgc]}tYtF|,}}tGjZdg|t]tFt_tFtatFa1|jetFtb|rK|sI|sG|ddD])}tbjg||ji|+|stbjk|rRtbjm}|sy|jUr;tbjnr+|jpjsntbjt}|r|jw|	r|t"jxj{d-xst"jxj{d.}|r:t"j$j'|r|j|j||s|r|j|jd/jtj|r|j|j|n^|r\|j|j||j|j|n%|r#|j}|r|j|tbjr%tFjtbjr%tFjt
dy#|j$rE}td	|d
ttjtjdYd}~d}~wwxYwcc}wcc}w)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-rbrrzeditor-on-startupr)rIdle)	className)fix_scalingIconsWindowszidle.ico)rg333333!@z.png) 0z.gif)rrrz	idle_%d%s)masterrIDLESTARTUP
PYTHONSTARTUPzdif 1:
            import sys as _sys
            _sys.argv = {!r}
            del _sys
            
)IgetoptrTrr~rrr0rrargverrorra	usage_msgrexitrr!rPrQrrrOrrrrrrpdirnamervgetcwdrr
NoDefaultRootrrridlelib.runrrR__file__
wm_iconbitmapisAquaTk	TkVersion
PhotoImagewm_iconphotorrrrNsetupApprr}newrOdictrlowerrqr3environrrrrrUrVrrpreferTabsPreferenceWarningrinversedictradestroy)rrrrenable_shellenable_editrscmdscriptstartupoptsrYroar,pathxr&dir
edit_startricondiriconfileextsizessize	iconfilesiconsrprefer_tabs_preference_warnings                              r(rrsTNLKE
C
FG]]388AB<@
d 19CL9EL9K9JJY'HHJ9L9Nzz
#"N9Fww~~f%(&1
L9GL9"#GL? @Q3iinn
3sxx=
!3ggoochhqk23Q34$qr(?	6D=	8d?	
	4HLL23	4	(C''//#&C#((?3'	(
iikchhHHOOAs###FI$7fFJ+K2{?Lg
DMMO'ggll277??84g>G
x977<<48,
__
C%EC E!&(WW\\';$+DE(	("+,4h7,,$''$$D!E
OOD% v G
*::h'/KK)
*		  "??

IIOO



::>>-03::>>/2	x0LL!!(+
f
!&"		$
LL##C(
LL((0LL!!&)	*0)K)K)M&)=>






LLNUy<<
uByk*<n(,s#&[;,]6];]
:]

])NN)RrrrrWImportErrorrarerrTctypesPROCESS_SYSTEM_DPI_AWAREOleDLLSetProcessDpiAwarenessr"r#r
rrrr5rPos.pathrr}r!rtextwrapr
rFrrr-idlelib.colorizerridlelib.configridlelib.delegatorrr~rridlelib.editorrridlelib.filelistridlelib.outwinrrrrrrridlelib.undorrrreofrr_	NameErrorr r)r,r0
checkcacher=r?rrrr	RPCClientrrrrrrrrr1r(<module>r
s-z%([[%<CKK!"<<7
#$ 

h667OP'	#	
 ,#'6%'GG&	
 CDHDH>B
")+/2;2F2F(5	{",{"|h(
2^
2/M/D1	1#--j(0j(Z
`	,l`	,F;4
	ln`zFu4	9?B~~O
Q-
1

V		s.G'G(<G7"G%(G43G47G?>G?