ó 6”þfc@scddlZddlZddlTddlmZddlmZddlmZddl Z ddl Z dZ dZ dZ d Zd Zd d efZdZdZd„Zd„Zd„Zd„Zdefd„ƒYZedkr_eƒZeZxder[ydGHejjƒWqûe k rKdGHe j!dƒdGHej"ƒqûe#ZqûXqûWndS(iÿÿÿÿN(t*(t Percolator(tColorDelegator(t TextVieweriiiiitAriali tboldsLucida ConsoleitnormalcCs6tjƒ}dtj|ƒkr<dGHdG|GHtjƒngtj|ƒD]+}|jdƒrL|jdƒ rL|^qL}g}x¬|D]¤}|jdƒr¯|j|ƒqŠtjj ||ƒ}tjj|ƒ|g}gtj|ƒD]*}|jdƒrí|jdƒrí|^qí}|j||ƒqŠW|S(Ns turtleDemo.pys:Directory of turtleDemo must be current working directory!sBut in your case this isttdemo_s.pycs.py( tostgetcwdtlistdirtsystexitt startswithtendswithtappendtpathtjoin(tcwdtentrytentries1tentries2Rtsubdirtscripttscripts((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pytgetExampleEntriess(     cCsttjddƒdS(NsHelp on turtleDemos demohelp.txt(Rtdemotroot(((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyt showDemoHelp.scCsttjddƒdS(NsAbout turtleDemosabout_turtledemo.txt(RRR(((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyt showAboutDemo1scCsttjddƒdS(NsAbout the new turtle modulesabout_turtle.txt(RRR(((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pytshowAboutTurtle4st DemoWindowcBskeZd d„Zd„Zddd„Zd„Zd„Zd„Zd„Z d „Z d „Z d „Z RS( c Csƒtƒ|_}t_|jd|jƒt|dtddƒ|_|jj dt ƒ|j ƒ|_ |j ƒ|_|jj|j |jƒ|jdƒt|ƒ|_}t|ƒ|_}t|ddƒ|_}t|dd d d d d ddƒ|_}|j|d<|j dtdtƒt|dddtƒ|_}|j|d<|j dtdt ƒ|j|d<|jdt ƒ|jd|jƒ|j dtdtddƒt!|ddd ddddd.ƒ|_"|j"j dtdd dt ƒ|j dtdt#dd ƒ|j dtdt#dd ƒt|ƒ|_$}|tj%_tj&|d!d"d#d!ƒtj%_'tj(ƒ|_)} tj*j+| | j'ƒ| j'|_,| gtj-_.|j,j dt/dt#ddƒt|dd$ƒ|_0} t1| d d%dt2d&d'd(d)d|j3ƒ|_4|j4j dtdt ddƒt1| d d*dt2d&d'd(d)d|j5ƒ|_6|j6j dtdt ddƒt1| d d+dt2d&d'd(d)d|j7ƒ|_8|j8j dtdt ddƒ|j0j dt/dt#dd ƒ|j$j dt/dt#ddƒt9|ƒj:t;ƒƒt<|_=t<|_>|rZ|j?|ƒn|j@tAtBtBtBd,d-ƒtC|_DdS(/NtWM_DELETE_WINDOWtrelieft borderwidthitfillsPython turtle-graphics examplestnametvbarttexttpadxitwraptnonetwidthi-tcommandtsidethbartorienttyscrollcommandtfonttxscrollcommandtexpanditheights --- tbgs#ddfRiRii iXièids START tfgtwhitetdisabledforegrounds#feds STOP s CLEAR sChoose example from menutblack(RiR(EtTkRtturtlet_roott wm_protocolt_destroytFrametRAISEDtmBartpacktXtmakeLoadDemoMenut ExamplesBtnt makeHelpMenut OptionsBtnt tk_menuBarttitlet left_framet text_framet ScrollbarR%tTextR&tyviewtLEFTtYt HORIZONTALR-txviewtBOTTOMtsettconfigttxtfonttLabelt output_lbltBOTHt graph_framet_ScreentScrolledCanvast_canvastScreentscreent TurtleScreent__init__tscanvast RawTurtletscreenstTOPt btn_frametButtontbtnfontt startDemot start_btntstopIttstop_btnt clearCanvast clear_btnRt insertfilterRtFalsetdirtytexitflagtloadfilet configGUItNORMALtDISABLEDtSTARTUPtstate( tselftfilenameRRIRJR%R&R-tg_framet_s_Re((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyR`9sp       !    cCs|jjƒtjƒdS(N(RtdestroyR R (Rx((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyR=ƒs ttbluecCs|jjd|ƒ|jjd|ƒ|tkrH|jjddƒn|jjddƒ|jjd|ƒ|tkr|jjddƒn|jjddƒ|jjd|ƒ|jjd|ƒ|tkrë|jjddƒn|jjddƒ|jjd|d|ƒdS(NRwR4s#d00s#fcaR&R5(RDRTRiRtRkRmRW(Rxtmenutstarttstoptclearttxttcolor((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyRs‡s   csftˆjdddddtƒ}|jdtddƒt|ƒ|_x tƒD]}‡fd †}t|t ƒr©|jj d |d d !dddtd ||ƒƒqP|d|d}}t|jƒ|j_ xR|D]J}|jj j d |d d !dddtd |t j j||ƒƒƒqÚW|jjd |d d|jj dtƒqPW|j|d<|S(NR&tExamplest underlineiR0R,R't2mcs‡‡fd†}|S(NcsˆjˆƒdS(N(Rr((Rxtx(s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pytemit§s((RˆR‰(Rx(Rˆs./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyt loadexample¦stlabeliiýÿÿÿR+iR(t MenubuttonR@tmenufontRARNtMenuRRt isinstancetstrt add_commandtchoicesRRRt add_cascade(RxtCmdBtnRRŠt_dirtentrieste((Rxs./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyRC s"!% (  cCs´t|jdddddtƒ}|jdtddƒt|ƒ|_|jjd d dtd tƒ|jjd d dtd t ƒ|jjd d dtd t ƒ|j|d<|S(NR&tHelpR†iR0R,R'R‡R‹sAbout turtle.pyR+sturtleDemo - HelpsAbout turtleDemoR( RŒR@RRARNRŽRR‘RRR(RxR”((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyRE»s! cCs'|js dS|jjƒt|_dS(N(RpR^R‚Ro(Rx((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 ƒ|_t|jƒ|jttttddƒt|_ndS( Ntrs1.0tendiiýÿÿÿs# - a Python turtle graphics examplesPress start buttontred(R™RRtexiststisdirtopentreadtcloseR&tdeletetinserttsplitRRHt __import__tmoduletreloadRsRtRutREADYRw(RxRytftcharstdirectfname((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyRrÍs %    cCs!|jƒt|_ttj_|jttttddƒ|j j ƒ|j j dƒt |_ y4|jjƒ}|dkr‹t|_ n t|_ Wn#tjk rºt|_ d}nX|j tkræ|jtttt|ƒn7|j tkrt|_|jttttddƒndS(Nsdemo running...R8tstandardt EVENTLOOPsstopped!suse mouse/keys or STOPRœ(R™tTrueRpR:R_t_RUNNINGRsRuRtR^R‚tmodetRUNNINGRwR¦tmaint EVENTDRIVENtDONEt TerminatorRq(Rxtresult((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyRhÞs.             cCs7|jƒ|jjddƒ|jttttƒdS(NtcursorR}(R™RaRTRsRtRu(Rx((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyRlùs cCsW|jrG|jƒt|_|jttttddƒttj_n ttj_dS(NsSTOPPED!Rœ( RqRlRoRsRtRuR:R_R°(Rx((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyRjþs    N( t__name__t __module__tNoneR`R=RsRCRER™RrRhRlRj(((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pyR7s J      t__main__sENTERING mainloopsCRASH!!!- WAIT A MOMENT!g333333Ó?s GOING ON ..(sAriali R(sLucida Consoleisnormal($R RtTkintertidlelib.PercolatorRtidlelib.ColorDelegatorRtidlelib.textViewRR:ttimeRvR¨R²RµR´RtRRgRURRRRtobjectRR¹RR¯tRUNRtmainlooptAttributeErrortsleepR™tFALSE(((s./usr/lib64/python2.7/Demo/turtle/turtleDemo.pytsD         Ó