/usr/lib64/python3.12/turtledemo/__pycache__
NameSizeModeActions
bytedesign.cpython-312.opt-1.pyc81990644editdlrm
bytedesign.cpython-312.opt-2.pyc77160644editdlrm
bytedesign.cpython-312.pyc81990644editdlrm
chaos.cpython-312.opt-1.pyc24780644editdlrm
chaos.cpython-312.opt-2.pyc24780644editdlrm
chaos.cpython-312.pyc24780644editdlrm
clock.cpython-312.opt-1.pyc63180644editdlrm
clock.cpython-312.opt-2.pyc60840644editdlrm
clock.cpython-312.pyc63180644editdlrm
colormixer.cpython-312.opt-1.pyc33200644editdlrm
colormixer.cpython-312.opt-2.pyc33200644editdlrm
colormixer.cpython-312.pyc33200644editdlrm
forest.cpython-312.opt-1.pyc50810644editdlrm
forest.cpython-312.opt-2.pyc47570644editdlrm
forest.cpython-312.pyc50810644editdlrm
fractalcurves.cpython-312.opt-1.pyc57760644editdlrm
fractalcurves.cpython-312.opt-2.pyc54660644editdlrm
fractalcurves.cpython-312.pyc57760644editdlrm
lindenmayer.cpython-312.opt-1.pyc37650644editdlrm
lindenmayer.cpython-312.opt-2.pyc32580644editdlrm
lindenmayer.cpython-312.pyc37650644editdlrm
minimal_hanoi.cpython-312.opt-1.pyc39770644editdlrm
minimal_hanoi.cpython-312.opt-2.pyc33820644editdlrm
minimal_hanoi.cpython-312.pyc39770644editdlrm
nim.cpython-312.opt-1.pyc134830644editdlrm
nim.cpython-312.opt-2.pyc132790644editdlrm
nim.cpython-312.pyc134830644editdlrm
paint.cpython-312.opt-1.pyc20730644editdlrm
paint.cpython-312.opt-2.pyc14330644editdlrm
paint.cpython-312.pyc20730644editdlrm
peace.cpython-312.opt-1.pyc18110644editdlrm
peace.cpython-312.opt-2.pyc15890644editdlrm
peace.cpython-312.pyc18110644editdlrm
penrose.cpython-312.opt-1.pyc71980644editdlrm
penrose.cpython-312.opt-2.pyc67840644editdlrm
penrose.cpython-312.pyc71980644editdlrm
planet_and_moon.cpython-312.opt-1.pyc62920644editdlrm
planet_and_moon.cpython-312.opt-2.pyc58440644editdlrm
planet_and_moon.cpython-312.pyc62920644editdlrm
rosette.cpython-312.opt-1.pyc28190644editdlrm
rosette.cpython-312.opt-2.pyc24770644editdlrm
rosette.cpython-312.pyc28190644editdlrm
round_dance.cpython-312.opt-1.pyc28150644editdlrm
round_dance.cpython-312.opt-2.pyc22170644editdlrm
round_dance.cpython-312.pyc28150644editdlrm
sorting_animate.cpython-312.opt-1.pyc102390644editdlrm
sorting_animate.cpython-312.opt-2.pyc97830644editdlrm
sorting_animate.cpython-312.pyc102390644editdlrm
tree.cpython-312.opt-1.pyc25340644editdlrm
tree.cpython-312.opt-2.pyc19520644editdlrm
tree.cpython-312.pyc25340644editdlrm
two_canvases.cpython-312.opt-1.pyc22830644editdlrm
two_canvases.cpython-312.opt-2.pyc20770644editdlrm
two_canvases.cpython-312.pyc22830644editdlrm
yinyang.cpython-312.opt-1.pyc16610644editdlrm
yinyang.cpython-312.opt-2.pyc14730644editdlrm
yinyang.cpython-312.pyc16610644editdlrm
__init__.cpython-312.opt-1.pyc4680644editdlrm
__init__.cpython-312.opt-2.pyc1460644editdlrm
__init__.cpython-312.pyc4680644editdlrm
__main__.cpython-312.opt-1.pyc214840644editdlrm
__main__.cpython-312.opt-2.pyc182530644editdlrm
__main__.cpython-312.pyc214840644editdlrm
Edit: /usr/lib64/python3.12/turtledemo/__pycache__/__main__.cpython-312.pyc (21484B)
{|j<dZddlZddlZddlddlmZmZddlmZddl m Z ddl Z ddl mZ ejdk(r dd lmZeej"j%ej"j'eZejd k(Zd Zd Zd ZdZdZddefZdZgdZdZ dZ!gdZ"dZ#defde fde jffZ$Gdde%Z&dZ'e(dk(re'yy)a ---------------------------------------------- turtleDemo - Help ---------------------------------------------- This document has two sections: (1) How to use the demo viewer (2) How to add your own demos to the demo repository (1) How to use the demo viewer. Select a demoscript from the example menu. The (syntax colored) source code appears in the left source code window. IT CANNOT BE EDITED, but ONLY VIEWED! The demo viewer windows can be resized. The divider between text and canvas can be moved by grabbing it with the mouse. The text font size can be changed from the menu and with Control/Command '-'/'+'. It can also be changed on most systems with Control-mousewheel when the mouse is over the text. Press START button to start the demo. Stop execution by pressing the STOP button. Clear screen by pressing the CLEAR button. Restart by pressing the START button again. SPECIAL demos, such as clock.py are those which run EVENTDRIVEN. Press START button to start the demo. - Until the EVENTLOOP is entered everything works as in an ordinary demo script. - When the EVENTLOOP is entered, you control the application by using the mouse and/or keys (or it's controlled by some timer events) To stop it you can and must press the STOP button. While the EVENTLOOP is running, the examples menu is disabled. - Only after having pressed the STOP button, you may restart it or choose another example script. * * * * * * * * In some rare situations there may occur interferences/conflicts between events concerning the demo script and those concerning the demo-viewer. (They run in the same process.) Strange behaviour may be the consequence and in the worst case you must close and restart the viewer. * * * * * * * * (2) How to add your own demos to the demo repository - Place the file in the same directory as turtledemo/__main__.py IMPORTANT! When imported, the demo should not modify the system by calling functions in other modules, such as sys, tkinter, or turtle. Global variables should be initialized in main(). - The code must contain a main() function which will be executed by the viewer (see provided example scripts). It may return a string which will be displayed in the Label below the source code window (when execution has finished.) - In order to run mydemo.py by itself, such as during development, add the following at the end of the file: if __name__ == '__main__': main() mainloop() # keep window open python -m turtledemo.mydemo # will then run it - If the demo is EVENT DRIVEN, main must return the string "EVENTLOOP". This informs the demo viewer that the script is still running and must be stopped by the user! If an "EVENTLOOP" demo runs by itself, as with clock, which uses ontimer, or minimal_hanoi, which loops by recursion, then the code should catch the turtle.Terminator exception that will be raised when the user presses the STOP button. (Paint is not such a demo; it only acts in response to mouse clicks and movements.) N)*)ColorDelegator color_config) Percolator) view_text)__doc__win32) fix_win_hidpidarwinArial )rrbold)zLucida Console normald)  r rctjtDcgc] }|jdr |ddk7r|dd"c}Scc}w)Nz.pyr_)oslistdirdemo_direndswith)entrys ,/usr/lib64/python3.12/turtledemo/__main__.pygetExampleEntriesr*vsL$&JJx$8 7$85 NN5 !eAh#o #2J$8 77 7s%AzTurtledemo helpzAbout turtledemozAbout turtle moduleceZdZddZdZdZdZdZddZddZ d Z dd Z d Z d Z d ZdZdZdZdZdZdZy) DemoWindowNc Ntx|_x}t_|j d|j d|j trTddl}|jdddddjtjddg|j|j |jdd |jdd |jd d d |jdd d |jdd d t!|t"d|_|j$j'|j)|j$dd|j$j'|j+|j$dd|j$j'|j-|j$dd|j$|d<t/|t0dt2d}|j5|j7||j5|j9||j;dddt=|d ddddt>|_ trjtC|d tDd!|jF"|_$tC|d#tDd!|jJ"|_&tC|d$tDd!|jN"|_(nltC|d tDd%d&|jF'|_$tC|d#tDd%d&|jJ'|_&tC|d$tDd%d&|jN'|_(|j@j;d ddd()|jHj;d d d*+|jLj;d dd*+|jPj;d dd*+tS|jTjWtYd,|_-d,|_.|r|j_||jatbtbtbd-d.td|_3y)/NzPython turtle-graphics examplesWM_DELETE_WINDOWrz/usr/bin/osascriptz-ez tell application "System Events"z>set frontmost of the first process whose unix id is {} to truezend tell)stderrstdoutr )weightZ)minsizer1r r)relief borderwidthExamples)menulabel underlineFontsizeHelpr7rz#ddd)orient sashwidth sashreliefbgrnews)row columnspanstickyz --- z#ddf)rr)heighttextr?fontr5r4z START z#00cc22)rFrGfgcommandz STOP z CLEAR whitez#fed)rFrGrHdisabledforegroundrI)rr)rAcolumnrCpadxew)rArLrCFzChoose example from menublack)4Tkrootturtle_roottitle wm_protocol_destroyr subprocessrunformatr$getpidDEVNULLgrid_rowconfiguregrid_columnconfigureMenuRAISEDmBar add_cascademakeLoadDemoMenu makeFontMenu makeHelpMenu PanedWindow HORIZONTALSOLIDadd makeTextFramemakeGraphFramegridLabelRIDGE output_lblButtonbtnfont startDemo start_btnstopItstop_btn clearCanvas clear_btnrrF insertfilterrdirtyexitflagloadfile configGUIDISABLEDSTARTUPstate)selffilenamerQrWpanes r)__init__zDemoWindow.__init__s*,$. .D6< 45 +T]];   NN,@66.>@DN 1V%H !D9 q48 !D9499**>+;<   MM( # x817 < cL|jj}|jj}|jjd|j|z z|jz |jj d|j |z z|j z y)Ng?)canvas winfo_width winfo_height xview_moveto canvwidth yview_moveto canvheight)reventcwidthcheights r)onResizezDemoWindow.onResizesx((*++**,   dnnV&;!t!NOrct|x|_}t|ddddx|_}t |t |dx|_}|j|d<|jtt t |d t x|_ }|j|d<|jtt |j |d <|j |d <t#t$|d<t&rdnd}|j)d|z|j*|j)d|z|j*|j)d|z|j,|j)d|z|j,|j/d|j0|j/d|j,|j/d|j*|jtt2d|S)NrFrnone-)namerMwrapwidthvbar)rrI)sidefillhbar)rr<yscrollcommandxscrollcommandrGCommandControlz <%s-minus>z<%s-underscore>z <%s-equal>z <%s-plus>zzzr )rrexpand)Frame text_frameTextrFr ScrollbarryviewpackLEFTYrfrxviewBOTTOMXsettupletxtfontr bind_all decrease_size increase_sizebindupdate_mousewheelBOTH)rrQrrFrrshortcuts r)rizDemoWindow.makeTextFrames',T{2* a%+27 7 DT$Zf== D**Y t! $$ZfZPP D**Y vA &!% !% W~V &9I lX-t/A/AB '(2D4F4FG lX-t/A/AB kH,d.@.@A ($*@*@A &(:(:; &(:(:; t$q 1rc |tj_d|_d|_tj |dd|j|jxtj_x|_}|j|jjd|jd|j d<tjx|_ }tjj|||gtj _|S)Nii iXz rr5)rR_ScreenrSrrScrolledCanvas_canvasr adjustScrolls _rootwindowrrScreenscreen TurtleScreenr RawTurtlescreens)rrQrrs r)rjzDemoWindow.makeGraphFrames $8>8M8Mc39A A Av t}}=()}%%}}. f$$VV4$*8  rcr|td<tt|jd<d|z|jd<y)Nr rGz Font size %drF)rrrFrn)rsizes r) set_txtsizezDemoWindow.set_txtsizes0 !'N &"04"7rcV|jttddz tyNr break)rmaxrMINIMUM_FONT_SIZErdummys r)rzDemoWindow.decrease_size # WQZ!^->?@rcV|jttddztyr)rminrMAXIMUM_FONT_SIZErs r)rzDemoWindow.increase_sizerrcp|jdkt k(r|jS|jS)Nr)deltar rr)rrs r)rzDemoWindow.update_mousewheels4 KK!OV ,%%' '%%' 'rctrU|jj||jj||jj|nx|jj||t k(rdnd|jj||t k(rdnd|jj||t k(rdnd|j j||y)N)r~z#d00z#fca)r~r?)rFrH)r rrconfigrtrvNORMALrn)rstartstopcleartxtcolors r)r{zDemoWindow.configGUIs  NN ! ! ! . MM t , NN ! ! ! . NN ! !/4VF " L MM t.2fnF& ! J NN ! !/4VF " L CE2rc|t|}tD]"}|ffd }|j|dt|$|S)Nc(j|yN)rz)r(rs r)loadz)DemoWindow.makeLoadDemoMenu..load,s e$rrr8r9rGrI)r^r* add_commandmenufont)rmasterr7r(rs` r)rbzDemoWindow.makeLoadDemoMenu(sDF|&(E  %   5A"*D  :)  rc.t|}|jdjt|jdjt|j t D]+}|ffd }|jt|dt|-|S)NzDecrease (C-'-'))r8rIrGzIncrease (C-'+')c(j|yr)r)rrs r)resizez'DemoWindow.makeFontMenu..resize;s  &rrr)r^rrrr add_separator font_sizesstr)rrr7rrs` r)rczDemoWindow.makeFontMenu2sF| 14;M;M&  ( 14;M;M&  ( D  '   3t9"*F  <  rczt|}tD]%\}}||ffd }|j|t|'|S)Nc4tj||yr)rrQ) help_label help_filers r)showz%DemoWindow.makeHelpMenu..showEs$))Z;r)r8rGrI)r^ help_entriesrr)rrr7rrrs` r)rdzDemoWindow.makeHelpMenuAsAF|%1 !J *i <   :Hd  K&2 rc`|jr"|jjd|_yyNF)rxrrrs r) refreshCanvaszDemoWindow.refreshCanvasJs% :: KK   DJ rc,|jdtj_d|z}t |t j ||_t|jjd5}|j}ddd|jjdd|jjd|jj|dz|j!t"t$t$ddt&|_y#1swYxYw) NFz turtledemo.rz1.0endz# - a Python turtle graphics examplezPress start buttonred)rurRr_RUNNING __import__sysmodulesmoduleopen__file__readrFdeleteinsertrQrTr{rr|READYr~)rrmodnamefcharss r)rzzDemoWindow.loadfileOs ',$(*7kk'* $++&& ,FFHE- & & #HHI vx+U 4 - ,s .D  Dc|jd|_dtj_|j t tt dd|jj|jjdt|_ |jj}|dk(r t|_ n t |_ |jt k(r!|j tt t|y|jtk(r)d|_|j t tt ddyy#tj"$r|j$Yyt |_ d}YwxYw) NTzdemo running...rOstandard EVENTLOOPzstopped!zuse mouse/keys or STOPr)rrxrRrrr{r|rrrmodeRUNNINGr~rmain EVENTDRIVENDONE TerminatorrQry)rresults r)rqzDemoWindow.startDemo^s  '+$ x(' 3  $  [[%%'F$( ! ::  NN68V! # ZZ; & DM NN8VX3U <'   yy DJF  s6D66E' E'&E'c|j|jjd|jj d|j t tty)Nall)cursor)rr_deleterrr{rr|rs r)ruzDemoWindow.clearCanvas{sE  E" "% vx2rc|jr8|jd|_|jtttdddt j _y)NFzSTOPPED!r)ryrur{rr|rRrrrs r)rszDemoWindow.stopItsA ==    !DM NN68X%u .',$rcpdtj_|jj d|_yr)rRrrrQdestroyrs r)rVzDemoWindow._destroys'',$  rr)r blue)__name__ __module__ __qualname__rrrirjrrrrr{rbrcrdrrzrqrursrVrr)r,r,s_IXP 8(8 ( 3  <:3 -rr,cLt}|jjyr)r,rQmainloop)demos r)rrs r(sTj :)& 2<<7*O 77??277??84 5  !    R   * 7 7  )*FNN+ KK\ zFr