ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/usr/lib64/python2.7/Demo/turtle/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/usr/lib64/python2.7/Demo/turtle/turtleDemo.pyo

�
Afc@s0ddlZddlZddlTddlmZddlmZddlmZddl	Z	ddl
Z
ej�Zdej
e�kr�dGHdGeGHej�nd	Zd
ZdZdZd
ZddefZdZd Zd�Zd!d"d#fZdefd��YZd�Zedkr,e�ndS($i����N(t*(t
Percolator(tColorDelegator(t	view_files
turtleDemo.pys:Directory of turtleDemo must be current working directory!sBut in your case this isiiiiitArialitboldsLucida ConsoleitnormalcCs�gtjt�D]+}|jd�r|jd�r|^q}g}x�|D]�}|jd�rs|j|�qNtjjt|�}tjj|�|g}gtj|�D]*}|jd�r�|jd�r�|^q�}|j||�qNW|S(Nttdemo_s.pycs.py(	tostlistdirtdemo_dirt
startswithtendswithtappendtpathtjointsys(tentrytentries1tentries2Rtsubdirtscripttscripts((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pytgetExampleEntriess
	sTurtledemo helpsdemohelp.txtsAbout turtledemosabout_turtledemo.txtsAbout turtle modulesabout_turtle.txtt
DemoWindowcBs�eZdd�Zd�Zd�Zd�Zddd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�ZRS(cCst�|_}t_|jd�|jd|j�|jddd�|jddd�|jddddd�|jddddd�|jd	dddd�t	|d
t
dd�|_|j�|_
|j�|_|jjddd
ddd�tdtdddtdd�}|j|j|��|j|j|��|jddd
ddd�t|dddddddd,ddd
t�|_t|dddtd d!d"d#d$|j�|_t|dd%dtd d!d"d#d$|j�|_t|dd&dtd d!d"d#d$|j �|_!|jjddd'dddd(d-�|jjddd'ddd)�|jjddd'ddd)�|j!jddd'd	dd)�t"|j#�j$t%��t&|_'t&|_(|r�|j)|�n|j*t+t,t,t,d*d+�t-|_.dS(.NsPython turtle-graphics examplestWM_DELETE_WINDOWitweightitminsizeiZiitrelieftborderwidthtrowt
columnspanitstickytnewstorientt	sashwidthit
sashrelieftbgs#dddtheightttexts --- s#ddftfontRiRs START tfgtwhitetdisabledforegrounds#fedtcommands STOP s CLEAR tcolumntpadxtewsChoose example from menutblack(RiR(ii(/tTktroottturtlet_rootttitletwm_protocolt_destroytgrid_rowconfiguretgrid_columnconfiguretFrametRAISEDtmBartmakeLoadDemoMenutExamplesBtntmakeHelpMenut
OptionsBtntgridtPanedWindowt
HORIZONTALtSOLIDtaddt
makeTextFrametmakeGraphFrametLabeltRIDGEt
output_lbltButtontbtnfontt	startDemot	start_btntstopIttstop_btntclearCanvast	clear_btnRR'tinsertfilterRtFalsetdirtytexitflagtloadfilet	configGUItNORMALtDISABLEDtSTARTUPtstate(tselftfilenameR2tpane((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyt__init__7sR
%		
cCsf|jj�}|jj�}|jjd|j||j�|jjd|j||j�dS(Ng�?(t_canvastwinfo_widthtwinfo_heighttxview_movetot	canvwidthtyview_movetot
canvheight(R]teventtcwidthtcheight((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pytonResizehs"c
Cst|�|_}t|dddddddd�|_}t|dd	�|_}|j|d
<|jdtdt	�t|dd
dt
�|_}|j|d
<|jdt
dt�t|d<|j|d<|j|d<|jdtdtdd�|S(NtnameR'R.itwraptnonetwidthi-tvbarR,tsidetfillthbarR"R(tyscrollcommandtxscrollcommandtexpandi(R:t
text_frametTextR't	ScrollbarRptyviewtpacktLEFTtYRCRstxviewtBOTTOMtXttxtfonttsettBOTH(R]R2RwR'RpRs((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyRFns




cCs�|tj_d|_d|_tj|dd|j|j�tj_|_}|j�|jj	d|j
�d|jd<tj�|_}tj
j||j�|j|_|gtj_|S(Ni�i iXs<Configure>iR(R3t_ScreenR4ReRgtScrolledCanvasRat
adjustScrollst_rootwindowtbindRktScreentscreentTurtleScreenR`tscanvast	RawTurtletscreens(R]R2tcanvast_s_((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyRG�s		,

ttbluecCs�|jjd|�|jjd|d|tkr7dnd�|jjd|d|tkrbdnd�|jjd|d|tkr�dnd�|jjd|d|�dS(NR\R%s#d00s#fcaR'R)(R>tconfigRNRYRPRRRJ(R]tmenutstarttstoptclearttxttcolor((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyRX�scsft�jdddddt�}|jdtdd�t|�|_xt�D]}�fd	�}t|t	�r�|jj
d
|dd!dddtd
||��qP|d|d}}t|j�|j_xR|D]J}|jjj
d
|dd!dddtd
|tj
j||���q�W|jjd
|dd|jjdt�qPW|j|d<|S(NR'tExamplest	underlineiR(RqR.t2mcs��fd�}|S(Ncs�j��dS(N(RW((R]tx(s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pytemit�s((R�R�(R](R�s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pytloadexample�stlabelii����R,iR�(t
MenubuttonR<tmenufontR{R|tMenuR�Rt
isinstancetstrtadd_commandtchoicesRRRtadd_cascade(R]tCmdBtnRR�t_dirtentrieste((R]s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyR=�s(
 !
cs�t�jdddddt�}|jdtdd�t|�|_xHtD]@\}}||�fd	�}|jjd
|dtd|�qMW|j|d<|S(
NR'tHelpR�iR(RqR.R�cs&t�j|tjjt|��dS(N(RR2RRRR
(t
help_labelt	help_file(R](s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pytshow�sR�R,R�(	R�R<R�R{R|R�R�thelp_entriesR�(R]R�R�R�R�((R]s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyR?�s!#
cCs'|js
dS|jj�t|_dS(N(RUR�R�RT(R]((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyt
refreshCanvas�s	
cCs�|j�tjj|�r�tjj|�r�t|d�}|j�}|j�|jj	dd�|jj
d|�tjj|�\}}|jj
|dd!d�t|d �|_|jttttdd�t|_ndS(	Ntrs1.0tendii����s# - a Python turtle graphics examplesPress start buttontred(R�RRtexiststisdirtopentreadtcloseR'tdeletetinserttsplitR2R5t
__import__tmoduleRXRYRZtREADYR\(R]R^tftcharstdirectfname((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyRW�s
%

cCs4|j�t|_ttj_|jttttdd�|j	j
�|j	jd�t|_
y4|jj�}|dkr�t|_
n	t|_
Wn6tjk
r�|jdkr�dSt|_
d}nX|j
tkr�|jtttt|�n7|j
tkr0t|_|jttttdd�ndS(Nsdemo running...R0tstandardt	EVENTLOOPsstopped!suse mouse/keys or STOPR�(R�tTrueRUR3R�t_RUNNINGRXRZRYR�R�tmodetRUNNINGR\R�tmaintEVENTDRIVENtDONEt
TerminatorR2tNoneRV(R]tresult((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyRM�s2
	

	
	

	cCs7|j�|jjdd�|jtttt�dS(NtcursorR�(R�R�R�RXRYRZ(R]((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyRQ�s
cCsW|jrG|j�t|_|jttttdd�ttj_nttj_dS(NsSTOPPED!R�(	RVRQRTRXRYRZR3R�R�(R]((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyRO�s	
	
cCs&ttj_|jj�d|_dS(N(RTR3R�R�R2tdestroyR�(R]((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyR7s
N(t__name__t
__module__R�R`RkRFRGRXR=R?R�RWRMRQROR7(((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyR5s1					
					
cCst�}|jj�dS(N(RR2tmainloop(tdemo((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyR�s	t__main__(RiR(sLucida ConsoleiR(sTurtledemo helpsdemohelp.txt(sAbout turtledemosabout_turtledemo.txt(sAbout turtle modulesabout_turtle.txt(RRtTkintertidlelib.PercolatorRtidlelib.ColorDelegatorRtidlelib.textViewRR3ttimetgetcwdR
R	texitR[R�R�R�R�RYR�RLR�RR�tobjectRR�R�(((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyt<module>s8
	
		�	

Zerion Mini Shell 1.0