grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026§ ¶¤h·ÆÙÜãóæ—dZdZddlZddlZddlZddlZddlZddlZddl Z ddl m Z m Z m Z ddlmZddlmZgd¢Zgd¢Zgd ¢Zd d gZeezezezd gzZgd ¢Zidd“dd“dd“dd“dd“dd“dd“dd“dd“dd“d d!“d"d#“d$d#“d%d&“d'd(“d)d*“d+d,“d-d.d/d0œ¥Zd1„Zd2„Z ee¦«n#e$red3¦«YnwxYwGd4„d5e¦«Zd6„Zd7„Zd8Z djd:„Z!Gd;„d„d?ej%¦«Z&ej$Z$Gd@„dAe'¦«Z(GdB„d e¦«Z)GdC„dDe¦«Z*GdE„dFe'¦«Z+GdG„dHe'¦«Z,GdI„dJe(¦«Z-GdK„dLe'¦«Z.GdM„dNe'¦«Z/GdO„dPe'¦«Z0GdQ„dRe/e.¦«Z1e1Z2dS„Z3GdT„dUe-¦«Z4GdV„dWe1¦«Z5e5Z6dkdY„Z7dZ„Z8ed)Z9 e9d*kr e8e9¦«n+#e:$red[e9¦«Yne$red\e9z¦«YnwxYwd]„Z;d^„Zda„Z?e?ee4dbdce=¦«e?ee5dddee<¦«e@ZAeBdfkr)dg„ZCdh„ZDdi„ZEeD¦«eE¦«eF¦«dSdS)laž Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzig and Seymour Papert in 1966. Imagine a robotic turtle starting at (0, 0) in the x-y plane. After an ``import turtle``, give it the command turtle.forward(15), and it moves (on-screen!) 15 pixels in the direction it is facing, drawing a line as it moves. Give it the command turtle.right(25), and it rotates in-place 25 degrees clockwise. By combining together these and similar commands, intricate shapes and pictures can easily be drawn. ----- turtle.py This module is an extended reimplementation of turtle.py from the Python standard distribution up to Python 2.5. (See: https://www.python.org) It tries to keep the merits of turtle.py and to be (nearly) 100% compatible with it. This means in the first place to enable the learning programmer to use all the commands, classes and methods interactively when using the module from within IDLE run with the -n switch. Roughly it has the following features added: - Better animation of the turtle movements, especially of turning the turtle. So the turtles can more easily be used as a visual feedback instrument by the (beginning) programmer. - Different turtle shapes, gif-images as turtle shapes, user defined and user controllable turtle shapes, among them compound (multicolored) shapes. Turtle shapes can be stretched and tilted, which makes turtles very versatile geometrical objects. - Fine control over turtle movement and screen updates via delay(), and enhanced tracer() and speed() methods. - Aliases for the most commonly used commands, like fd for forward etc., following the early Logo traditions. This reduces the boring work of typing long sequences of commands, which often occur in a natural way when kids try to program fancy pictures on their first encounter with turtle graphics. - Turtles now have an undo()-method with configurable undo-buffer. - Some simple commands/methods for creating event driven programs (mouse-, key-, timer-events). Especially useful for programming games. - A scrollable Canvas class. The default scrollable Canvas can be extended interactively as needed while playing around with the turtle(s). - A TurtleScreen class with methods controlling background color or background image, window and canvas size and other properties of the TurtleScreen. - There is a method, setworldcoordinates(), to install a user defined coordinate-system for the TurtleScreen. - The implementation uses a 2-vector class named Vec2D, derived from tuple. This class is public, so it can be imported by the application programmer, which makes certain types of computations very natural and compact. - Appearance of the TurtleScreen and the Turtles at startup/import can be configured by means of a turtle.cfg configuration file. The default configuration mimics the appearance of the old turtle module. - If configured appropriately the module reads in docstrings from a docstring dictionary in some different language, supplied separately and replaces the English ones by those read in. There is a utility function write_docstringdict() to write a dictionary with the original (English) docstrings to disc, so it can serve as a template for translations. Behind the scenes there are some features included with possible extensions in mind. These will be commented and documented elsewhere. z-turtle 1.1b- - for Python 3.1 - 4. 5. 2009éN)ÚisfileÚsplitÚjoin)Údeepcopy)Ú simpledialog) ÚScrolledCanvasÚ TurtleScreenÚScreenÚ RawTurtleÚTurtleÚRawPenÚPenÚShapeÚVec2D)ÚaddshapeÚbgcolorÚbgpicÚbyeÚ clearscreenÚ colormodeÚdelayÚ exitonclickÚ getcanvasÚ getshapesÚlistenÚmainloopÚmodeÚnuminputÚonkeyÚ onkeypressÚ onkeyreleaseÚ onscreenclickÚontimerÚregister_shapeÚ resetscreenÚ screensizeÚsetupÚsetworldcoordinatesÚ textinputÚtitleÚtracerÚturtlesÚupdateÚ window_heightÚ window_width)OÚbackÚbackwardÚ begin_fillÚ begin_polyÚbkÚcircleÚclearÚ clearstampÚ clearstampsÚcloneÚcolorÚdegreesÚdistanceÚdotÚdownÚend_fillÚend_polyÚfdÚ fillcolorÚfillingÚforwardÚget_polyÚgetpenÚ getscreenÚ get_shapepolyÚ getturtleÚgotoÚheadingÚ hideturtleÚhomeÚhtÚisdownÚ isvisibleÚleftÚltÚonclickÚondragÚ onreleaseÚpdÚpenÚpencolorÚpendownÚpensizeÚpenupÚposÚpositionÚpuÚradiansÚrightÚresetÚ resizemodeÚrtÚsethÚ setheadingÚsetposÚ setpositionÚ settiltangleÚ setundobufferÚsetxÚsetyÚshapeÚ shapesizeÚshapetransformÚ shearfactorÚ showturtleÚspeedÚstÚstampÚtiltÚ tiltangleÚtowardsÚ turtlesizeÚundoÚundobufferentriesÚupÚwidthÚwriteÚxcorÚycorÚwrite_docstringdictÚdoneÚ Terminator)rr1r4rArNrRrVr\r^rcrdrfrgrrrwrzr{r{çà?Úheightgè?Ú canvwidthi�Ú canvheighti,Ú leftrightÚ topbottomrÚstandardrçð?ré ÚundobuffersizeièrlÚclassicrXÚblackrBrbÚnoresizeÚvisibleTÚlanguageÚenglishÚ exampleturtleÚturtleÚscreenzPython Turtle GraphicsF)Ú examplescreenr*Ú using_IDLEcóN—t|d¦«5}| ¦«}ddd¦«n #1swxYwYi}|D]ã}| ¦«}|r| d¦«rŒ. | d¦«\}}n%#t $rt d|›d|›�¦«YŒiwxYw| ¦«}| ¦«}|dvrt|¦«}n5 d|vrt|¦«}nt|¦«}n#t $rYnwxYw|||<Œä|S) z/Convert content of config-file into dictionary.ÚrNú#ú=zBad line in config-file z: )ÚTrueÚFalseÚNonez''z""ú.) ÚopenÚ readlinesÚstripÚ startswithrÚ ValueErrorÚprintÚevalÚfloatÚint)ÚfilenameÚfÚcfglinesÚcfgdictÚlineÚkeyÚvalues ú-/opt/alt/python311/lib64/python3.11/turtle.pyÚ config_dictr°¬s‘€å ˆh˜Ñ Ô ð! Ø—;’;‘=”=ˆð!ð!ð!ñ!ô!ð!ð!ð!ð!ð!ð!øøøð!ð!ð!ð!à€GØððˆØ�zŠz‰|Œ|ˆØð �t—’ sÑ+Ô+ð Ø ð ØŸš C™œ‰JˆC��øÝð ð ð Ý ˆE°x°x°xÀÀÐEÑ FÔ FÐ FØ ˆHð øøøð�iŠi‰kŒkˆØ— ’ ‘ ” ˆØ Ð9Ð 9Ð 9ݘ‘K”KˆEˆEð Ø˜%�<�<Ý! %™LœL�E�Eå ™JœJ�EøøÝð ð ð Ø�ð øøøàˆ�‰ ˆ Ø €Ns0‘2²6¹6Á0B  B+Â*B+Ã+#DÄ DÄDcó†—d}i}i}t|¦«rt|¦«}d|vr d|dz} tt¦«\}}t ||¦«}n#t $rd}YnwxYwt|¦«rt|¦«}t  |¦«t  |¦«dS)a@Read config-files, change configuration-dict accordingly. If there is a turtle.cfg file in the current working directory, read it from there. If this contains an importconfig-value, say 'myway', construct filename turtle_mayway.cfg else use turtle.cfg and read it from the import-directory, where turtle.py is located. Update configuration dictionary first according to config-file, in the import directory, then according to config-file in the current working directory. If no config-file is found, the default configuration is used. z turtle.cfgÚ importconfigz turtle_%s.cfgÚN)rr°rÚ__file__rÚ ExceptionÚ_CFGr-)r«Ú default_cfgÚcfgdict1Úcfgdict2ÚheadÚtailÚ cfg_file2s r¯Ú readconfigr½ÉsÚ€ð€KØ€HØ€HÝ ˆkÑÔð,ݘ{Ñ+Ô+ˆØ˜Ð!Ð!Ø%¨°Ô(@Ñ@ˆ ðÝ�8‘_”_‰ ˆˆdݘ˜{Ñ+Ô+ˆ ˆ øÝ ðððØˆ ˆ ˆ ðøøøå ˆiÑÔð*ݘyÑ)Ô)ˆÝ‡K‚K�ÑÔÐ݇K‚K�ÑÔÐÐÐsµ'AÁ A,Á+A,z"No configfile read, reason unknowncóN—eZdZdZd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d S) ra¯A 2 dimensional vector class, used as a helper class for implementing turtle graphics. May be useful for turtle graphics programs also. Derived from tuple, so a vector is a tuple! Provides (for a, b vectors, k number): a+b vector addition a-b vector subtraction a*b inner product k*a and a*k multiplication with scalar |a| absolute value of a a.rotate(angle) rotation có<—t |||f¦«S©N)ÚtupleÚ__new__)ÚclsÚxÚys r¯rÂz Vec2D.__new__ûs€Ý�}Š}˜S 1 a &Ñ)Ô)Ð)ócó^—t|d|dz|d|dz¦«S©Nré©r©ÚselfÚothers r¯Ú__add__z Vec2D.__add__ýó,€Ý�T˜!”W˜U 1œXÑ% t¨A¤w¨u°Q¬xÑ'7Ñ8Ô8Ð8rÆcó¶—t|t¦«r#|d|dz|d|dzzSt|d|z|d|z¦«SrÈ)Ú isinstancerrËs r¯Ú__mul__z Vec2D.__mul__ÿsY€Ý �e�UÑ #Ô #ð 5ؘ”7˜5 œ8Ñ# D¨¤G¨E°!¬HÑ$4Ñ4Ð 4Ý�T˜!”W˜U‘] D¨¤G¨E¡MÑ2Ô2Ð2rÆcó¨—t|t¦«st|t¦«r"t|d|z|d|z¦«StSrÈ)rÑr§r¦rÚNotImplementedrËs r¯Ú__rmul__zVec2D.__rmul__sK€Ý �e�SÑ !Ô !ð 7¥Z°µuÑ%=Ô%=ð 7ݘ˜aœ ™¨¨Q¬°© Ñ6Ô6Ð 6ÝÐrÆcó^—t|d|dz |d|dz ¦«SrÈrÊrËs r¯Ú__sub__z Vec2D.__sub__rÏrÆcó>—t|d |d ¦«SrÈrÊ©rÌs r¯Ú__neg__z Vec2D.__neg__ s€Ý�d˜1”g�X  Q¤˜xÑ(Ô(Ð(rÆcó—tj|ŽSrÀ)ÚmathÚhypotrÙs r¯Ú__abs__z Vec2D.__abs__ s€ÝŒz˜4Ð Ð rÆcó(—t|d |d¦«}tj|¦«}tj|¦«tj|¦«}}t|d|z|d|zz|d|z|d|zz¦«S)z.rotate self counterclockwise by angle rÉr)rrÜr_ÚcosÚsin)rÌÚangleÚperpÚcÚss r¯Úrotatez Vec2D.rotate s€õ�d˜1”g�X˜t AœwÑ'Ô'ˆÝ” ˜UÑ#Ô#ˆÝŒx˜‰Œ¥¤¨¡¤ˆ1ˆÝ�T˜!”W˜Q‘Y˜t Aœw q™yÑ(¨$¨q¬'°!©)°D¸´G¸A±IÑ*=Ñ>Ô>Ð>rÆcó"—|d|dfSrÈ©rÙs r¯Ú__getnewargs__zVec2D.__getnewargs__s€Ø�Q”˜˜aœÐ!Ð!rÆcó —d|zS)Nz (%.2f,%.2f)rèrÙs r¯Ú__repr__zVec2D.__repr__s €Ø˜tÑ#Ð#rÆN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rÂrÎrÒrÕr×rÚrÞrærérërèrÆr¯rrís´€€€€€ð ð ð*ð*ð*ð9ð9ð9ð3ð3ð3ðððð9ð9ð9ð)ð)ð)ð!ð!ð!ð?ð?ð?ð"ð"ð"ð$ð$ð$ð$ð$rÆrcó—t|j¦«}| ¦«|D]}t||¦«Œ|j ¦«D]'\}}t |¦«tjkr|||<Œ(dS)ú#helper function for Scrolled CanvasN) ÚlistÚ __bases__ÚreverseÚ __methodDictÚ__dict__ÚitemsÚtypeÚtypesÚ FunctionType)rÃÚ_dictÚbaseListÚ_superr­r®s r¯rõrõ"sŽ€å�C”MÑ"Ô"€HØ ×ÒÑÔÐØð$ð$ˆÝ�V˜UÑ#Ô#Ð#Ð#Ø”l×(Ò(Ñ*Ô*ðð‰ ˆˆUÝ �‰;Œ;�%Ô,Ò ,Ð ,؈E�#‰JøððrÆcóN—i}t||¦«| ¦«S)rñ)rõÚkeys)rÃrûs r¯Ú __methodsr,s%€à €EÝ��eÑÔÐØ �:Š:‰<Œ<ÐrÆzTdef %(method)s(self, *args, **kw): return self.%(attribute)s.%(method)s(*args, **kw)rècóª—i}t||¦«i}t|¦«}| ¦«D]2}|dd…dks|dd…dks||vs||vrŒ'||||<Œ3| ¦«D]S\}} || dœ} t |t ¦«r t ||dœz} t| | ¦«t||| |¦«ŒTdS)NrÉÚ_éÿÿÿÿ)ÚmethodÚfunc)rÚ attribute) rõrrÿr÷rÑÚstrÚ __stringBodyÚexecÚsetattr) Ú fromClassÚtoClassÚtoPartÚexcludeÚ_dict_1rûÚmfcÚexrrÚdÚ execStrings r¯Ú__forwardmethodsr6s€à€GÝ�˜'Ñ"Ô"Ð"Ø €EÝ �IÑ Ô €CØ�lŠl‰nŒnð$ð$ˆØ ˆbˆqˆbŒ6�SŠ=ˆ=˜B˜r˜s˜sœG sšN˜N¨b°G¨m¨m¸rÀS¸y¸yØ à œ ˆE�"‰IˆIàŸ š ™ œ ð.ð.‰ ˆ�Ø tÐ ,Ð ,ˆÝ �f�cÑ "Ô "ð Iå¨6ÀÐHÐHÑHð å ˆZ˜ÑÔÐÝ� ˜6 1 V¤9Ñ-Ô-Ð-Ð-ð .ð.rÆcóV—eZdZdZ dd„Zdd„Zd„Zd „Zd „Zd „Z d „Z d „Z d„Z d„Z dS)rzÄModeled after the scrolled canvas class from Grayons's Tkinter book. Used as the default canvas, which pops up automatically when using turtle graphics functions or the Turtle class. éôé^éXc ó—tj ||||¬¦«| ¦«|_||c|_|_||c|_|_d|_ tj ||||j tj d¬¦«|_ tj ||j jtj¬¦«|_tj ||j j¬¦«|_|j  |jj|jj¬¦«| dd d¬ ¦«| dd d¬ ¦«|j  d |d ddd d d ¬ ¦«|j d |d dd d d d ¬ ¦«|j d |d d dd d d ¬ ¦«| ¦«|j d |j¦«dS)N)r{rƒÚwhiteé)r{rƒÚbgÚreliefÚ borderwidth)ÚcommandÚorient)r)ÚxscrollcommandÚyscrollcommandrrÉ)ÚweightÚminsizeÚnews©ÚpadxÚin_ÚpadyÚrowÚcolumnÚrowspanÚ columnspanÚstickyz )ÚTKÚFrameÚ__init__Úwinfo_toplevelÚ _rootwindowr{rƒr„r…rÚCanvasÚSUNKENÚ_canvasÚ ScrollbarÚxviewÚ HORIZONTALÚhscrollÚyviewÚvscrollÚ configureÚsetÚ rowconfigureÚcolumnconfigureÚgridraÚbindÚonResize)rÌÚmasterr{rƒr„r…s r¯r1zScrolledCanvas.__init__Qs÷€å Œ×Ò˜$ ¨e¸FÐÑCÔCÐCØ×.Ò.Ñ0Ô0ˆÔØ"'¨ÐˆŒ �D”KØ*3°ZÐ'ˆŒ˜œØˆŒÝ”y ¨u¸VØ$(¤GµB´IÈ1ðNñNôNˆŒ å”| F°D´LÔ4FÝ+-¬=ð:ñ:ô:ˆŒ å”| F°D´LÔ4FÐGÑGÔGˆŒ Ø Œ ×Ò¨d¬lÔ.>Ø.2¬lÔ.>ð ñ @ô @ð @à ×Ò˜! A¨qÐÑ1Ô1Ð1Ø ×Ò˜Q q°!ÐÑ4Ô4Ð4Ø Œ ×Ò˜q¨°1¸!Ø !°¸&ð ñ Bô Bð Bà Œ ×Ò˜q¨°1¸!Ø !°¸&ð ñ Bô Bð Bà Œ ×Ò˜q¨°1¸!Ø !°¸&ð ñ Bô Bð Bà � Š ‰ Œ ˆ Ø Ô×Ò˜m¨T¬]Ñ;Ô;Ð;Ð;Ð;rÆNcó¼—|r||_|r||_|r||_|j ||j dz|j dz|jdz|jdzf¬¦«|j d|j|jz dzz|jz ¦«|j d|j|jz dzz|jz ¦«|  ¦«dS)zB¼oñ#Nñ Oô Oð Oà ×ÒÑÔÐÐÐrÆc ó:—|j ¦«}|j ¦«}|j d|j|z z|jz ¦«|j d|j|z z|jz ¦«||jks ||jkrF|j d|dddddd¬¦«|j  d|dddddd¬¦«dS|j  ¦«|j   ¦«dS)zA Adjust scrollbars according to window- and canvas-size. r‚rÉrr%r&N) r6Ú winfo_widthÚ winfo_heightrIr„rJr…r:rAr<Ú grid_forget)rÌÚcwidthÚcheights r¯rKzScrolledCanvas.adjustScrolls|s7€ð”×)Ò)Ñ+Ô+ˆØ”,×+Ò+Ñ-Ô-ˆØ Œ ×!Ò! # t¤~°fÑ'<Ñ"=¸d¼nÑ"LÑMÔMÐMØ Œ ×!Ò! # t¤°wÑ'>Ñ"?ÀÄÑ"OÑPÔPÐPØ �D”NÒ "Ð " g°´Ò&?Ð&?Ø ŒL× Ò  1¨D°q¸aØ%&°¸aÈð ñ Pô Pð Pà ŒL× Ò  1¨D°q¸aØ%&°¸aÈð ñ Pô Pð Pð Pð Pð ŒL× $Ò $Ñ &Ô &Ð &Ø ŒL× $Ò $Ñ &Ô &Ð &Ð &Ð &rÆcó.—| ¦«dS)zself-explanatoryN)rK)rÌÚevents r¯rCzScrolledCanvas.onResizeŒs€à ×ÒÑÔÐÐÐrÆcó —|jj|ŽS©ú@ 'forward' method, which canvas itself has inherited... )r6Úbbox©rÌÚargss r¯rXzScrolledCanvas.bbox�s€ð!ˆtŒ|Ô  $Ð'Ð'rÆcó&—|jj|i|¤ŽSrV)r6Úcget©rÌrZÚkwargss r¯r\zScrolledCanvas.cget•s€ð!ˆtŒ|Ô  $Ð1¨&Ð1Ð1Ð1rÆcó*—|jj|i|¤ŽdS©rWN)r6rHr]s r¯rHzScrolledCanvas.configšó$€ð ˆŒ Ô˜TÐ, VÐ,Ð,Ð,Ð,Ð,rÆcó*—|jj|i|¤ŽdSr`)r6rBr]s r¯rBzScrolledCanvas.bindŸs$€ð ˆŒ Ô˜4Ð* 6Ð*Ð*Ð*Ð*Ð*rÆcó*—|jj|i|¤ŽdSr`)r6Úunbindr]s r¯rdzScrolledCanvas.unbind¤rarÆcó8—|j ¦«dSr`)r6Ú focus_forcerÙs r¯rfzScrolledCanvas.focus_force©s€ð Œ × Ò Ñ"Ô"Ð"Ð"Ð"rÆ)rrrr©NNN)rìrírîrïr1rarKrCrXr\rHrBrdrfrèrÆr¯rrKsÆ€€€€€ððð 25ØDGð<ð<ð<ð<ð2ðððð$'ð'ð'ð ððð(ð(ð(ð 2ð2ð2ð -ð-ð-ð +ð+ð+ð -ð-ð-ð #ð#ð#ð#ð#rÆrr6có<—eZdZdZd„Zd„Zd„Zd„Zd„Zd„Z d„Z d S) Ú_Rootz'Root class for Screen based on Tkinter.cóD—tj |¦«dSrÀ)r/ÚTkr1rÙs r¯r1z_Root.__init__³s€Ý Œ�Š�tÑÔÐÐÐrÆcón—t|||||¦«|_|j dd¬¦«dS)NrÉÚboth)ÚexpandÚfill)rr6Úpack)rÌr{rƒrQrRs r¯Ú setupcanvasz_Root.setupcanvas¶s:€Ý% d¨E°6¸6À7ÑKÔKˆŒ Ø Œ ×Ò ¨ÐÑ0Ô0Ð0Ð0Ð0rÆcó—|jSrÀ)r6rÙs r¯Ú _getcanvasz_Root._getcanvasºs €ØŒ|ÐrÆcó>—| d||||fz¦«dS)Nz %dx%d%+d%+d)Úgeometry)rÌr{rƒÚstartxÚstartys r¯Ú set_geometryz_Root.set_geometry½s(€Ø � Š �m U¨F°F¸FÐ$CÑCÑDÔDÐDÐDÐDrÆcó2—| d|¦«dS)NÚWM_DELETE_WINDOW)Ú wm_protocol)rÌÚdestroys r¯Ú ondestroyz_Root.ondestroyÀs€Ø ×ÒÐ+¨WÑ5Ô5Ð5Ð5Ð5rÆcó*—| ¦«SrÀ)Úwinfo_screenwidthrÙs r¯Ú win_widthz_Root.win_widthÃs€Ø×%Ò%Ñ'Ô'Ð'rÆcó*—| ¦«SrÀ)Úwinfo_screenheightrÙs r¯Ú win_heightz_Root.win_heightÆs€Ø×&Ò&Ñ(Ô(Ð(rÆN) rìrírîrïr1rqrsrxr}r€rƒrèrÆr¯riri±s†€€€€€Ø1Ð1ðððð1ð1ð1ððððEðEðEð6ð6ð6ð(ð(ð(ð)ð)ð)ð)ð)rÆricóô—eZdZdZd„Zd„Zd„Zd„Z d&d„Zd „Z d&d „Z d „Z d „Z d „Z d„Zd'd„Zd„Zd(d„Zd(d„Zd(d„Zd(d„Zd„Zd'd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd „Zd)d!„Z d"„Z!d#„Z"d$„Z#d)d%„Z$dS)*ÚTurtleScreenBasezàProvide the basic graphics functionality. Interface between Tkinter and turtle.py. To port turtle.py to some different graphics toolkit a corresponding TurtleScreenBase class has to be implemented. cóf—tjdd|j¬¦«}| ¦«|S)z$return a blank image object rÉ)r{rƒrD)r/Ú PhotoImageÚcvÚblank)rÌÚimgs r¯Ú _blankimagezTurtleScreenBase._blankimageÔs.€õŒm !¨A°d´gÐ>Ñ>Ô>ˆØ � Š ‰ Œ ˆ ؈ rÆcó8—tj||j¬¦«S)z`return an image object containing the imagedata from a gif-file named filename. )ÚfilerD)r/r‡rˆ)rÌr¨s r¯Ú_imagezTurtleScreenBase._imageÛs€õŒ} (°4´7Ð;Ñ;Ô;Ð;rÆcóž—||_t|t¦«r|jj}|jj}n{t |j d¦«¦«}t |j d¦«¦«}|j | dz| dz|dz|dzf¬¦«||_||_dx|_|_ dS)Nr{rƒr©rFr‰) rˆrÑrr„r…r§r\rHÚxscaleÚyscale)rÌrˆÚwÚhs r¯r1zTurtleScreenBase.__init__ás»€ØˆŒÝ �b�.Ñ )Ô )ð GØ”Ô!ˆAØ”Ô"ˆAˆAå�D”G—L’L Ñ)Ô)Ñ*Ô*ˆAÝ�D”G—L’L Ñ*Ô*Ñ+Ô+ˆAØ ŒG�NŠN¨A¨2¨q©5°1°"°a±%¸¸A¹¸qÀ!¹tÐ*EˆNÑ FÔ FÐ F؈ŒØˆŒØ$'Ð'ˆŒ �d”k�k�krÆcó<—|j ddd¬¦«S)zc󾕗‰j |j¦«‰jz ‰j |j¦« ‰jz }}‰||¦«dSrÀ©rˆÚcanvasxrÄr‘ÚcanvasyrÅr’©rTrÄrÅÚfunrÌs €€r¯Úeventfunz+TurtleScreenBase._onclick..eventfuneóTø€ØœŸš¨¬Ñ0Ô0°´Ñ<ØœŸš¨¬Ñ1Ô1Ð1°$´+Ñ=ð�à��A�q‘ ” � � � rÆ©rˆÚ tag_unbindÚtag_bind©rÌr²rØÚnumÚaddrÙs` ` r¯Ú_onclickzTurtleScreenBase._onclick\suøø€ð ˆ;Ø ŒG× Ò ˜t ]°SÑ%8Ñ 9Ô 9Ð 9Ð 9Ð 9ð ð ð ð ð ð ð ŒG× Ò ˜T =°3Ñ#6¸À#Ñ FÔ FÐ FÐ FÐ FrÆc󚇇—‰€ ‰j |d|z¦«dSˆˆfd„}‰j |d|z||¦«dS)agBind fun to mouse-button-release event on turtle. fun must be a function with two arguments, the coordinates of the point on the canvas where mouse button is released. num, the number of the mouse-button defaults to 1 If a turtle is clicked, first _onclick-event will be performed, then _onscreensclick-event. Nzc󾕗‰j |j¦«‰jz ‰j |j¦« ‰jz }}‰||¦«dSrÀrÔr×s €€r¯rÙz-TurtleScreenBase._onrelease..eventfunwrÚrÆrÛrÞs` ` r¯Ú _onreleasezTurtleScreenBase._onreleaseks‚øø€ð ˆ;Ø ŒG× Ò ˜tÐ%?À#Ñ%EÑ FÔ FÐ FÐ FÐ Fð ð ð ð ð ð ð ŒG× Ò ˜TÐ#=ÀÑ#CØ% sñ ,ô ,ð ,ð ,ð ,rÆc󚇇—‰€ ‰j |d|z¦«dSˆˆfd„}‰j |d|z||¦«dS)aqBind fun to mouse-move-event (with pressed mouse button) on turtle. fun must be a function with two arguments, the coordinates of the actual mouse position on the canvas. num, the number of the mouse-button defaults to 1 Every sequence of mouse-move-events on a turtle is preceded by a mouse-click event on that turtle. Nzcóâ•— ‰j |j¦«‰jz ‰j |j¦« ‰jz }}‰||¦«dS#t$rYdSwxYwrÀ)rˆrÕrÄr‘rÖrÅr’rµr×s €€r¯rÙz*TurtleScreenBase._ondrag..eventfunŠs{ø€ðØ œGŸOšO¨E¬GÑ4Ô4°T´[Ñ@Ø œGŸOšO¨E¬GÑ4Ô4Ð4°T´[Ñ@ð�Aà�C˜˜1‘I”I�I�I�IøÝ ðððØ�D�DðøøøsƒAA Á A.Á-A.rÛrÞs` ` r¯Ú_ondragzTurtleScreenBase._ondrag~swøø€ð ˆ;Ø ŒG× Ò ˜tÐ%8¸3Ñ%>Ñ ?Ô ?Ð ?Ð ?Ð ?ð ð ð ð ð ð ð ŒG× Ò ˜TÐ#6¸Ñ#<¸hÈÑ LÔ LÐ LÐ LÐ LrÆc󖇇—‰€‰j d|z¦«dSˆˆfd„}‰j d|z||¦«dS)aGBind fun to mouse-click event on canvas. fun must be a function with two arguments, the coordinates of the clicked point on the canvas. num, the number of the mouse-button defaults to 1 If a turtle is clicked, first _onclick-event will be performed, then _onscreensclick-event. NrÒc󾕗‰j |j¦«‰jz ‰j |j¦« ‰jz }}‰||¦«dSrÀrÔr×s €€r¯rÙz1TurtleScreenBase._onscreenclick..eventfunŸrÚrÆ©rˆrdrB)rÌrØrßràrÙs`` r¯Ú_onscreenclickzTurtleScreenBase._onscreenclick“smøø€ð ˆ;Ø ŒG�NŠN˜=¨3Ñ.Ñ /Ô /Ð /Ð /Ð /ð ð ð ð ð ð ð ŒG�LŠL˜¨Ñ,¨h¸Ñ <Ô <Ð <Ð <Ð có•—‰¦«dSrÀrè©rTrØs €r¯rÙz0TurtleScreenBase._onkeyrelease..eventfun¬óø€Ø�‘”���rÆrê©rÌrØr­rÙs ` r¯Ú _onkeyreleasezTurtleScreenBase._onkeyrelease¥sgø€ð ˆ;Ø ŒG�NŠNÐ,¨sÑ2°DÑ 9Ô 9Ð 9Ð 9Ð 9ð ð ð ð ð à ŒG�LŠLÐ*¨SÑ0°(Ñ ;Ô ;Ð ;Ð ;Ð ;rÆcó‡—‰€?|€|j dd¦«dS|j d|zd¦«dSˆfd„}|€|j d|¦«dS|j d|z|¦«dS)z�If key is given, bind fun to key-press event of key. Otherwise bind fun to any key-press. Canvas must have focus. See method listen. Nz z có•—‰¦«dSrÀrèrîs €r¯rÙz.TurtleScreenBase._onkeypress..eventfun»rïrÆrêrðs ` r¯Ú _onkeypresszTurtleScreenBase._onkeypress°s§ø€ð ˆ;؈{Ø”—’˜|¨TÑ2Ô2Ð2Ð2Ð2à”—’˜°Ñ4°dÑ;Ô;Ð;Ð;Ð;ð ð ð ð ð àˆ{Ø”— ’ ˜\¨8Ñ4Ô4Ð4Ð4Ð4à”— ’ ˜_¨sÑ2°HÑ=Ô=Ð=Ð=Ð=rÆcó8—|j ¦«dS)z=Set focus on canvas (in order to collect key-events) N)rˆrfrÙs r¯Ú_listenzTurtleScreenBase._listenÂs€ð Œ×ÒÑÔÐÐÐrÆcó€—|dkr|j |¦«dS|j ||¦«dS)z?Install a timer, which calls fun after t milliseconds. rN)rˆÚ after_idler·©rÌrØÚts r¯Ú_ontimerzTurtleScreenBase._ontimerÇsE€ð �Š6ˆ6Ø ŒG× Ò ˜sÑ #Ô #Ð #Ð #Ð #à ŒG�MŠM˜!˜SÑ !Ô !Ð !Ð !Ð !rÆcó<—|j dd|¬¦«S)z0Create and return image item on canvas. r©Úimage)rˆÚ create_image)rÌrþs r¯Ú _createimagezTurtleScreenBase._createimageÏs!€ðŒw×#Ò# A q°Ð#Ñ6Ô6Ð6rÆcó¤—|\}}|j |||jz| |jzf¦«|j ||¬¦«dS)zZConfigure image item as to draw image object at position (x,y) on canvas) rýN)rˆrŸr‘r’Ú itemconfig)rÌr²r\rþrÄrÅs r¯Ú _drawimagezTurtleScreenBase._drawimageÔsX€ð‰ˆˆ1Ø Œ�Š�t˜a $¤+™o°¨r°D´KÑ/?Ð@ÑAÔAÐAØ Œ×Ò˜4 uÐÑ-Ô-Ð-Ð-Ð-rÆcór—|j ||¬¦«|j |¦«dS)z³Configure image item as to draw image object at center of canvas. Set item to the first item in the displaylist, so it will be drawn below any other item .rýN)rˆrÚ tag_lower)rÌr²rþs r¯Ú _setbgpiczTurtleScreenBase._setbgpicÜs;€ð Œ×Ò˜4 uÐÑ-Ô-Ð-Ø Œ×Ò˜$ÑÔÐÐÐrÆcó6—|j |¦«S)zQReturn 'line' or 'polygon' or 'image' depending on type of item. )rˆrør±s r¯Ú_typezTurtleScreenBase._typeäs€ðŒw�|Š|˜DÑ!Ô!Ð!rÆcó�‡—|j |¦«Šˆfd„tdt‰¦«d¦«D¦«}|S)a returns list of coordinate-pairs of points of item Example (for insiders): >>> from turtle import * >>> getscreen()._pointlist(getturtle().turtle._item) [(0.0, 9.9999999999999982), (0.0, -9.9999999999999982), (9.9999999999999982, 0.0)] >>> có8•—g|]}‰|‰|dz f‘ŒS)rÉrè)Ú.0Úir¥s €r¯ú z/TurtleScreenBase._pointlist..ós,ø€Ð >Ð >Ð > Aˆr�!Œu�r˜!˜A™#”w�hÐÐ >Ð >Ð >rÆrr)rˆrŸÚrangeÚlen)rÌr²Úplr¥s @r¯Ú _pointlistzTurtleScreenBase._pointlistêsHø€ðŒW�^Š^˜DÑ !Ô !ˆØ >Ð >Ð >Ð >­¨qµ#°b±'´'¸1Ñ)=Ô)=Ð >Ñ >Ô >ˆØˆ rÆcóD—|j ||||f¬¦«dS)Nr�)rˆrH)rÌÚsrx1Úsry1Úsrx2Úsry2s r¯Ú_setscrollregionz!TurtleScreenBase._setscrollregionös'€Ø Œ�Š T¨4°°tÐ$<ˆÑ=Ô=Ð=Ð=Ð=rÆcóP—|j ¦«}|D]‰}t|j |¦«¦«}g}|rI|dd…\}}| ||z¦«| ||z¦«|dd…}|°I|jj|g|¢RŽŒŠdS)Nr)rˆÚfind_allròrŸrž) rÌÚ xscalefactorÚ yscalefactorr÷r²Ú coordinatesÚ newcoordlistrÄrÅs r¯Ú_rescalezTurtleScreenBase._rescaleùsÑ€Ø”× Ò Ñ"Ô"ˆØð 0ð 0ˆDݘtœwŸ~š~¨dÑ3Ô3Ñ4Ô4ˆK؈LØð .Ø" 2 A 2”‘��1Ø×#Ò# A¨ Ñ$4Ñ5Ô5Ð5Ø×#Ò# A¨ Ñ$4Ñ5Ô5Ð5Ø)¨!¨"¨"œo� ð ð .ð ˆDŒGŒN˜4Ð / ,Ð /Ð /Ð /Ð /Ð /ð 0ð 0rÆcó—t|jt¦«s|j|jfS||cxur|cxur€nn|jj|jjfS|�||_|�||_|j |||¦«dS)zaResize the canvas the turtles are drawing on. Does not alter the drawing window. N)rÑrˆrr„r…rarLs r¯Ú_resizezTurtleScreenBase._resizesŸ€õ ˜$œ'¥>Ñ2Ô2ð 3Ø”> 4¤?Ð2Ð 2Ø ˜ Ð 0Ð 0Ð 0Ð 0 bÐ 0Ð 0Ð 0Ð 0Ð 0Ð 0Ð 0Ð 0Ø”7Ô$ d¤gÔ&8Ð8Ð 8Ø Ð Ø&ˆDŒNØ Ð !Ø(ˆDŒOØ Œ� Š �i ¨RÑ0Ô0Ð0Ð0Ð0rÆcóº—|j ¦«}|dkr |jd}|j ¦«}|dkr |jd}||fS)z; Return the width and height of the turtle window. rÉr{rƒ)rˆrNrO)rÌr{rƒs r¯Ú _window_sizezTurtleScreenBase._window_sizes^€ð”×#Ò#Ñ%Ô%ˆØ �AŠ:ˆ:Ø”G˜GÔ$ˆEØ”×%Ò%Ñ'Ô'ˆØ �QŠ;ˆ;Ø”W˜XÔ&ˆFØ�fˆ}ÐrÆcóB—|jj ¦«dS)a{Starts event loop - calling Tkinter's mainloop function. No argument. Must be last statement in a turtle graphics program. Must NOT be used if a script is run from within IDLE in -n mode (No subprocess) - for interactive use of turtle graphics. Example (for a TurtleScreen instance named screen): >>> screen.mainloop() N)rˆÚtkrrÙs r¯rzTurtleScreenBase.mainloops €ð ŒŒ ×ÒÑÔÐÐÐrÆcó:—tj|||j¬¦«S)a…Pop up a dialog window for input of a string. Arguments: title is the title of the dialog window, prompt is a text mostly describing what information to input. Return the string input If the dialog is canceled, return None. Example (for a TurtleScreen instance named screen): >>> screen.textinput("NIM", "Name of first player:") )Úparent)rÚ askstringrˆ)rÌr*Úprompts r¯r)zTurtleScreenBase.textinput.s€õÔ% e¨V¸D¼GÐDÑDÔDÐDrÆcó@—tj||||||j¬¦«S)a·Pop up a dialog window for input of a number. Arguments: title is the title of the dialog window, prompt is a text mostly describing what numerical information to input. default: default value minval: minimum value for input maxval: maximum value for input The number input must be in the range minval .. maxval if these are given. If not, a hint is issued and the dialog remains open for correction. Return the number input. If the dialog is canceled, return None. Example (for a TurtleScreen instance named screen): >>> screen.numinput("Poker", "Your stakes:", 1000, minval=10, maxval=10000) )Ú initialvalueÚminvalueÚmaxvaluer&)rÚaskfloatrˆ)rÌr*r(ÚdefaultÚminvalÚmaxvals r¯rzTurtleScreenBase.numinput=s.€õ$Ô$ U¨FÀØ.4¸vØ,0¬Gð5ñ5ô5ð 5rÆ)NNNFrÀ©rÉNrg)%rìrírîrïr‹rŽr1r™r¦r«r®r³rµr¹r¿rÁrÐrárärçrërñrôrörûrrrrrrrr r"rr)rrèrÆr¯r…r…Ìs]€€€€€ðððððð<ð<ð<ð (ð (ð (ðOðOðOð 37Ø05ð(ð(ð(ð(ð28ð8ð8ð -1Ø-2ð(ð(ð(ð(ð.ððð ððð ðððððð&ð&ð&ð&ð ð ð ð" Gð Gð Gð Gð,ð,ð,ð,ð&MðMðMðMð*=ð=ð=ð=ð$ <ð <ð <ð>ð>ð>ð>ð$ððð "ð"ð"ð7ð7ð7ð .ð.ð.ð ð ð ð"ð"ð"ð ð ð ð>ð>ð>ð 0ð 0ð 0ð 1ð 1ð 1ð 1ð ð ð ð ð ð ð Eð Eð Eð5ð5ð5ð5ð5ð5rÆr…có—eZdZdZdS)r�z¶Will be raised in TurtleScreen.update, if _RUNNING becomes False. This stops execution of a turtle graphics script. Main purpose: use in the Demo-Viewer turtle.Demo.py. N©rìrírîrïrèrÆr¯r�r�Ys€€€€€ððð  €DrÆcó—eZdZdZdS)ÚTurtleGraphicsErrorzSome TurtleGraphics Error Nr3rèrÆr¯r5r5bs€€€€€ððððrÆr5có"—eZdZdZdd„Zdd„ZdS)rzàData structure modeling shapes. attribute _type is one of "polygon", "image", "compound" attribute _data is - depending on _type a poygon-tuple, an image or a list constructed using the addcomponent method. Ncó†—||_|dkr%t|t¦«rt|¦«}n‡|dkrft|t¦«rP| ¦« d¦«r)t|¦«rt  |¦«}n|dkrg}ntd|z¦«‚||_ dS)NÚpolygonrþú.gifÚcompoundzThere is no shape type %s) rrÑròrÁrÚlowerÚendswithrr rŽr5Ú_data)rÌÚtype_Údatas r¯r1zShape.__init__ns¿€ØˆŒ Ø �IÒ Ð Ý˜$¥Ñ%Ô%ð #ݘT‘{”{�øØ �gÒ Ð Ý˜$¥Ñ$Ô$ð 5Ø—:’:‘<”<×(Ò(¨Ñ0Ô0ð5µV¸D±\´\ð5Ý'×.Ò.¨tÑ4Ô4�Døà �jÒ Ð ØˆDˆDå%Ð&AÀEÑ&IÑJÔJÐ J؈Œ ˆ ˆ rÆcóŒ—|jdkrtd|jz¦«‚|€|}|j |||g¦«dS)a-Add component to a shape of type compound. Arguments: poly is a polygon, i. e. a tuple of number pairs. fill is the fillcolor of the component, outline is the outline color of the component. call (for a Shapeobject namend s): -- s.addcomponent(((0,0), (10,10), (-10,10)), "red", "blue") Example: >>> poly = ((0,0),(10,-5),(0,10),(-10,-5)) >>> s = Shape("compound") >>> s.addcomponent(poly, "red", "blue") >>> # .. add more components and then use register_shape() r:z Cannot add component to %s ShapeN)rr5r=rž)rÌÚpolyror—s r¯Ú addcomponentzShape.addcomponent~sa€ð Œ:˜Ò #Ð #Ý%Ð&HØBFÄ*ñ'MñNôNð Nà ˆ?؈GØ Œ ×Ò˜4  wÐ/Ñ0Ô0Ð0Ð0Ð0rÆrÀ)rìrírîrïr1rBrèrÆr¯rrgsF€€€€€ððð ðððð 1ð1ð1ð1ð1ð1rÆrcó:—eZdZdZd d„Zd d„Zd„Zd„Zd„Zd „Z dS) ÚTbufferz5Ring buffer used as undobuffer for RawTurtle objects.rŠcóH—||_dgg|z|_d|_d|_dS)NrF)ÚbufsizeÚbufferÚptrÚcumulate)rÌrFs r¯r1zTbuffer.__init__˜s+€ØˆŒ Ø�v�h Ñ(ˆŒ ؈ŒØˆŒ ˆ ˆ rÆNcó„—|€#t|j¦«D] }dg|j|<Œn||_dgg|z|_d|_dS)Nr)rrFrGrH)rÌrFr s r¯raz Tbuffer.reset�sX€Ø ˆ?ݘ4œ<Ñ(Ô(ð (ð (�Ø"& �” ˜A‘�ð (ð#ˆDŒLØ ˜6˜( WÑ,ˆDŒK؈ŒˆˆrÆcóÈ—|jdkrV|js(|jdz|jz|_||j|j<dS|j|j |¦«dSdSrÈ)rFrIrHrGržr±s r¯Úpushz Tbuffer.push¥sl€Ø Œ<˜!Ò Ð Ø”=ð 3Ø œH q™L¨D¬LÑ8�”Ø(,�” ˜DœHÑ%Ð%Ð%à” ˜DœHÔ%×,Ò,¨TÑ2Ô2Ð2Ð2Ð2ð Ð rÆcóš—|jdkr?|j|j}|€dSdg|j|j<|jdz |jz|_|SdSrÈ)rFrGrHr±s r¯Úpopz Tbuffer.pop¬sX€Ø Œ<˜!Ò Ð Ø”;˜tœxÔ(ˆD؈|Ø�tà)-¨�” ˜DœHÑ%Ø œH q™L¨D¬LÑ8�”Ø� ð Ð rÆcóH—|j|j dg¦«z SrÀ)rFrGÚcountrÙs r¯Ú nr_of_itemszTbuffer.nr_of_itemsµs!€ØŒ|˜dœk×/Ò/°°Ñ7Ô7Ñ7Ð7rÆcóZ—t|j¦«dzt|j¦«zS)Nú )rrGrHrÙs r¯rëzTbuffer.__repr__·s$€Ý�4”;ÑÔ #Ñ%­¨D¬H© ¬ Ñ5Ð5rÆ)rŠrÀ) rìrírîrïr1rarLrNrQrërèrÆr¯rDrD–s~€€€€€Ø?Ð?ððððð ðððð3ð3ð3ðððð8ð8ð8ð6ð6ð6ð6ð6rÆrDcó—eZdZdZdZedededfd„Zd„Zd#d „Zd „Z d#d „Z d „Z d „Z d#d„Z d„Zd„Zd„Zd$d„Zd#d„Zd„Zd„Zd„Zd„Zd„Zd„Zd%d„Zd„Zd#d„Zd$d„Zd&d „Zd#d!„Zd'd"„ZeZ eZ!eZ"e Z#eZ$dS)(r zÑProvides screen oriented methods like bgcolor etc. Only relies upon the methods of TurtleScreenBase and NOT upon components of the underlying graphics toolkit - which is Tkinter in this case. Trrrc óz—t ||¦«tdd¦«tdd¦«tdd¦«tdd¦«tdd¦«tdd¦«td| ¦«¦«d œ|_d d i|_||_||_td |_ g|_ |  ¦«tj d krH| ¦«}| ddddd¦«| ddddd¦«dSdS)Nr8)©éöÿÿÿr©rŠr©rrŠ))ré)éþÿÿÿé)rrŠ)éüÿÿÿé)éùÿÿÿé )é÷ÿÿÿé)éúÿÿÿé)r_rÉ)éûÿÿÿéýÿÿÿ)éøÿÿÿrc)rcrg)r]re©rr_)ére)érg)rbrc)rdrf)r^rÉ)rjrd)r`rb)r^r`)rir^)rÉrŠ)rr\)rX)ç…ëQ¸#@縅ëQ¸@)ç®Gáz. @ç…ëQ¸…@)rnrm)rlrkrY)縅ëQ¸Àrk)ç…ëQ¸…Àrm)ç®Gáz. Àrn)ç…ëQ¸#ÀrlrV)rrro)rqrp)rprq)rorr)g€g$À)rlrr)rnrq)rmrp)rkro))rŠrW)rŠrŠ)rWrŠ)rWrW))rŠç®GázÀ)rgš™™™™'@)rWrs)©rr)rerarh)rdrarþ)Úarrowr“r5ÚsquareÚtrianglerŒr‰Únopicr³rÚdarwinÚwmÚ attributesržz-topmostÚ1Ú0)r…r1rr‹Ú_shapesÚ_bgpicsÚ_modeÚ _delayvaluer¶Ú _colormodeÚ_keysr6ÚsysÚplatformr2Úcall)rÌrˆrrrÚ rootwindows r¯r1zTurtleScreen.__init__ÅsR€å×!Ò! $¨Ñ+Ô+Ð+õ# 9Ð.GÑHÔHÝ" 9ð/&ñ'ô'õ # 9ð/HñIôIõ # 9ð/)ñ*ô*å" 9ð/+ñ,ô,å" 9Ð.KÑLÔLÝ" 7¨D×,<Ò,<Ñ,>Ô,>Ñ?Ô?ð%ðˆŒ ð*  "�~ˆŒ àˆŒ Ø ˆÔݘ{Ô+ˆŒØˆŒ Ø � Š ‰ Œ ˆ Ý Œ<˜8Ò #Ð #ð×*Ò*Ñ,Ô,ˆJØ �OŠO˜D ,°°ZÀÑ EÔ EÐ EØ �OŠO˜D ,°°ZÀÑ EÔ EÐ EÐ EÐ Eð $Ð #rÆcó—td|_td|_| d¦«| d¦«|_d|_d|_d|_g|_ |  d¦«d D]}|  d |¦«Œ|  d ¦«|j d d …D].}| d |¦«|  d |¦«Œ/d t_d S) aqDelete all drawings and all turtles from the TurtleScreen. No argument. Reset empty TurtleScreen to its initial state: white background, no backgroundimage, no eventbindings and tracing on. Example (for a TurtleScreen instance named screen): >>> screen.clear() Note: this method is not available as function. rrÚallr³rxrÉrr)rÉréN)r¶r�r‚r³rÚ_bgpicÚ _bgpicnameÚ_tracingÚ_updatecounterÚ_turtlesrrSr rƒrr Ú_pen)rÌÚbtnr­s r¯r6zTurtleScreen.clearísù€õ  œ=ˆÔݘ{Ô+ˆŒØ � Š �UÑÔÐØ×'Ò'¨Ñ+Ô+ˆŒ Ø!ˆŒØˆŒ ØˆÔØˆŒ Ø � Š �WÑÔÐØð $ð $ˆCØ �LŠL˜˜sÑ #Ô #Ð #Ð #Ø �Š˜ÑÔÐØ”:˜a˜a˜a”=ð 'ð 'ˆCØ �JŠJ�t˜SÑ !Ô !Ð !Ø �OŠO˜D #Ñ &Ô &Ð &Ð &Ø�Œ ˆ ˆ rÆNcó:—|€|jS| ¦«}|dvrtd|z¦«‚||_|dvrH| |j dz|j dz|jdz|jdz¦«dx|_|_| ¦«dS)ahSet turtle-mode ('standard', 'logo' or 'world') and perform reset. Optional argument: mode -- one of the strings 'standard', 'logo' or 'world' Mode 'standard' is compatible with turtle.py. Mode 'logo' is compatible with most Logo-Turtle-Graphics. Mode 'world' uses userdefined 'worldcoordinates'. *Attention*: in this mode angles appear distorted if x/y unit-ratio doesn't equal 1. If mode is not given, return the current mode. Mode Initial turtle heading positive angles ------------|-------------------------|------------------- 'standard' to the right (east) counterclockwise 'logo' upward (north) clockwise Examples: >>> mode('logo') # resets turtle heading to north >>> mode() 'logo' N©rˆÚlogoÚworldzNo turtle-graphics-mode %s)rˆr”rr‰) r€r;r5rr„r…r‘r’ra©rÌrs r¯rzTurtleScreen.mode sµ€ð, ˆ<Ø”:Ð Ø�zŠz‰|Œ|ˆØ Ð4Ð 4Ð 4Ý%Ð&BÀTÑ&IÑJÔJÐ J؈Œ Ø Ð'Ð 'Ð 'Ø × !Ò ! 4¤> /°1Ñ"4°t´Ð6FÈÑ6IØ'+¤~°qÑ'8¸$¼/È1Ñ:Lñ Nô Nð Nà(+Ð +ˆDŒK˜$œ+Ø � Š ‰ Œ ˆ ˆ ˆ rÆcó\—| ¦«dkr| d¦«t||z ¦«}t||z ¦«}| ¦«\}}| |dz |dz ¦«|j|j} } |j|z |_|j|z |_||jz} | |jz} |j| z} |j| z}| | | | |¦«|  |j| z |j| z ¦«|  ¦«dS)asSet up a user defined coordinate-system. Arguments: llx -- a number, x-coordinate of lower left corner of canvas lly -- a number, y-coordinate of lower left corner of canvas urx -- a number, x-coordinate of upper right corner of canvas ury -- a number, y-coordinate of upper right corner of canvas Set up user coodinat-system and switch to mode 'world' if necessary. This performs a screen.reset. If mode 'world' is already active, all drawings are redrawn according to the new coordinates. But ATTENTION: in user-defined coordinatesystems angles may appear distorted. (see Screen.mode()) Example (for a TurtleScreen instance named screen): >>> screen.setworldcoordinates(-10,-0.5,50,1.5) >>> for _ in range(36): ... left(10) ... forward(0.5) r•éN) rr¦r"r&r‘r’r„r…rrr-)rÌÚllxÚllyÚurxÚuryÚxspanÚyspanÚwxÚwyÚ oldxscaleÚ oldyscalerrrrs r¯r(z TurtleScreen.setworldcoordinates-s$€ð, �9Š9‰;Œ;˜'Ò !Ð !Ø �IŠI�gÑ Ô Ð Ý�c˜C‘iÑ Ô ˆÝ�c˜C‘iÑ Ô ˆØ×"Ò"Ñ$Ô$‰ˆˆBØ �Š˜˜2™˜r "™uÑ%Ô%Ð%Ø#œ{¨D¬K�9ˆ Ø”n uÑ,ˆŒ Ø”o¨Ñ-ˆŒ Ø�T”[Ñ ˆØˆt�d”kÑ!ˆØŒ~ Ñ$ˆØŒ Ñ%ˆØ ×Ò˜d D¨$°Ñ5Ô5Ð5Ø � Š �d”k )Ñ+¨T¬[¸Ñ-BÑCÔCÐCØ � Š ‰ Œ ˆ ˆ ˆ rÆcó—|€Z| ¦« d¦«r$td| |¦«¦«}n4t d¦«‚t |t ¦«rtd|¦«}||j|<dS)a¥Adds a turtle shape to TurtleScreen's shapelist. Arguments: (1) name is the name of a gif-file and shape is None. Installs the corresponding image shape. !! Image-shapes DO NOT rotate when turning the turtle, !! so they do not display the heading of the turtle! (2) name is an arbitrary string and shape is a tuple of pairs of coordinates. Installs the corresponding polygon shape (3) name is an arbitrary string and shape is a (compound) Shape object. Installs the corresponding compound shape. To use a shape, you have to issue the command shape(shapename). call: register_shape("turtle.gif") --or: register_shape("tri", ((0,0), (10,10), (-10,10))) Example (for a TurtleScreen instance named screen): >>> screen.register_shape("triangle", ((5,-3),(0,5),(-5,-3))) Nr9rþz;Bad arguments for register_shape. Use help(register_shape)r8)r;r<rrŽr5rÑrÁr~)rÌÚnamerls r¯r$zTurtleScreen.register_shapeTs“€ð. ˆ=à�zŠz‰|Œ|×$Ò$ VÑ,Ô,ð Jݘg t§{¢{°4Ñ'8Ô'8Ñ9Ô9��å)ð+HñJôJðJå ˜�uÑ %Ô %ð ,ݘ) UÑ+Ô+ˆEà"ˆŒ �TÑÐÐrÆcó:—t|¦«dkr|d}t|t¦«r<| |¦«s|dkr|St dt|¦«z¦«‚ |\}}}n4#t t f$r t dt|¦«z¦«‚wxYw|jdkrd„|||fD¦«\}}}d|cxkrdkr"nnd|cxkrdkrnnd|cxkrdks!nt d t|¦«z¦«‚d |||fzS) aReturn color string corresponding to args. Argument may be a string or a tuple of three numbers corresponding to actual colormode, i.e. in the range 0<=n<=colormode. If the argument doesn't represent a color, an error is raised. rÉrr³zbad color string: %súbad color arguments: %sr‰có2—g|]}td|z¦«‘ŒS©gào@©Úround©r rÄs r¯r z*TurtleScreen._colorstr..�ó"€Ð9Ð9Ð9¨!•u˜U 1™W‘~”~Ð9Ð9Ð9rÆéÿúbad color sequence: %sú #%02x%02x%02x)rrÑrr¿r5Ú TypeErrorr£r‚)rÌr:r˜ÚgÚbs r¯Ú _colorstrzTurtleScreen._colorstrws\€õ ˆu‰:Œ:˜Š?ˆ?ؘ!”HˆEÝ �e�SÑ !Ô !ð OØ×"Ò" 5Ñ)Ô)ð O¨U°bª[¨[Ø� å)Ð*@Å3ÀuÁ:Ä:Ñ*MÑNÔNÐNð N؉GˆAˆq�!�!øÝ�:Ð&ð Nð Nð NÝ%Ð&?Å#ÀeÁ*Ä*Ñ&LÑMÔMÐ Mð Nøøøà Œ?˜cÒ !Ð !Ø9Ð9°°1°a¨yÐ9Ñ9Ô9‰GˆAˆq�!Ø�a��’�˜3’���� Q¨! ] ]¢] ]¨s¢] ] ] ] ]¸¸a¸¸º¸À3º¸¸¸Ý%Ð&>ÅÀUÁÄÑ&KÑLÔLÐ LØ ! Q¨ Ñ*Ð*s Á.A5Á51B&có&‡‡—‰ d¦«s‰St‰¦«dkrˆfd„dD¦«}n.–s/ø€Ð:Ð:Ð:¨1•#�d˜1˜Q˜q™S˜5”k 2Ñ&Ô&Ð:Ð:Ð:rÆ)rÉrŠrdricóB•—g|]}dt‰|d¦«z‘ŒS)rZr¶)r r”r·s €r¯r z'TurtleScreen._color..˜s,ø€Ð8Ð8Ð8¨!�"•S˜˜aœ "Ñ%Ô%Ñ%Ð8Ð8Ð8rÆrÉzbad colorstring: %sc3ó2•K—|]}|‰jzdz V—ŒdS)r­N)r‚)r rärÌs €r¯ú z&TurtleScreen._color..›s/øèè€Ð9Ð9°�Q˜œÑ(¨Ñ,Ð9Ð9Ð9Ð9Ð9Ð9rÆ)r¢rr5rÁ)rÌr·r¥s`` r¯Ú_colorzTurtleScreen._color’s°øø€Ø�Š˜sÑ#Ô#ð ØˆKÝ ˆt‰9Œ9˜Š>ˆ>Ø:Ð:Ð:Ð:° Ð:Ñ:Ô:ˆBˆBÝ �‰YŒY˜!Š^ˆ^Ø8Ð8Ð8Ð8¨t°A°B°B¬xÐ8Ñ8Ô8ˆBˆBå%Ð&;¸dÑ&BÑCÔCÐ CÝÐ9Ð9Ð9Ð9°bÐ9Ñ9Ô9Ñ9Ô9Ð9rÆcóˆ—|€|jS|dkrt|¦«|_dS|dkrt|¦«|_dSdS)aqReturn the colormode or set it to 1.0 or 255. Optional argument: cmode -- one of the values 1.0 or 255 r, g, b values of colortriples have to be in range 0..cmode. Example (for a TurtleScreen instance named screen): >>> screen.colormode() 1.0 >>> screen.colormode(255) >>> pencolor(240,160,80) Nr‰r­)r‚r¦r§)rÌÚcmodes r¯rzTurtleScreen.colormode�sL€ð ˆ=Ø”?Ð "Ø �CŠ<ˆ<Ý# E™lœlˆDŒOˆOˆOØ �cŠ\ˆ\Ý! %™jœjˆDŒOˆOˆOðˆ\rÆcóv—|jD]0}| |j¦«| ¦«Œ1dS)z®Reset all Turtles on the Screen to their initial state. No argument. Example (for a TurtleScreen instance named screen): >>> screen.reset() N)r�Ú_setmoder€ra)rÌr“s r¯razTurtleScreen.reset²sB€ð”mð ð ˆFØ �OŠO˜DœJÑ 'Ô 'Ð 'Ø �LŠL‰NŒNˆNˆNð ð rÆcó—|jS)z»Return the list of turtles on the screen. Example (for a TurtleScreen instance named screen): >>> screen.turtles() [] )r�rÙs r¯r,zTurtleScreen.turtles¾s €ðŒ}ÐrÆcó’—|r| |¦«}nd}| |¦«}|�| |¦«}|S)aŸSet or return backgroundcolor of the TurtleScreen. Arguments (if given): a color string or three numbers in the range 0..colormode or a 3-tuple of such numbers. Example (for a TurtleScreen instance named screen): >>> screen.bgcolor("orange") >>> screen.bgcolor() 'orange' >>> screen.bgcolor(0.5,0,0.5) >>> screen.bgcolor() '#800080' N)r³rÁr»©rÌrZr:s r¯rzTurtleScreen.bgcolorÇsQ€ð ð Ø—N’N 4Ñ(Ô(ˆEˆEàˆEØ— ’ ˜eÑ$Ô$ˆØ Ð Ø—K’K Ñ&Ô&ˆE؈ rÆcó´—|€|jSt|¦«|_d|_|�t|¦«|_|jr| ¦«dSdS)aeTurns turtle animation on/off and set delay for update drawings. Optional arguments: n -- nonnegative integer delay -- nonnegative integer If n is given, only each n-th regular screen update is really performed. (Can be used to accelerate the drawing of complex graphics.) Second arguments sets delay value (see RawTurtle.delay()) Example (for a TurtleScreen instance named screen): >>> screen.tracer(8, 25) >>> dist = 2 >>> for i in range(200): ... fd(dist) ... rt(90) ... dist += 2 Nr)r�r§rŽr�r-)rÌÚnrs r¯r+zTurtleScreen.tracerÞs_€ð& ˆ9Ø”=РݘA™œˆŒ ØˆÔØ Ð Ý" 5™zœzˆDÔ Ø Œ=ð Ø �KŠK‰MŒMˆMˆMˆMð ð rÆcó@—|€|jSt|¦«|_dS)zø Return or set the drawing delay in milliseconds. Optional argument: delay -- positive integer Example (for a TurtleScreen instance named screen): >>> screen.delay(15) >>> screen.delay() 15 N)r�r§r¸s r¯rzTurtleScreen.delayús&€ð ˆ=ØÔ#Ð #ݘu™:œ:ˆÔÐÐrÆcó¨—tjsdt_t‚|jdkr'|xjdz c_|xj|jzc_dSdS)zIncrement update counter.TrrÉN)r Ú_RUNNINGr�r�rŽrÙs r¯Ú _incrementudczTurtleScreen._incrementudc s`€åÔ$ð Ø$(�LÔ !ÝÐ Ø Œ=˜1Ò Ð Ø Ð Ô  1Ñ $Ð Ô Ø Ð Ô  4¤=Ñ 0Ð Ô Ð Ð ð Ð rÆcóÖ—|j}d|_| ¦«D]*}| ¦«| ¦«Œ+||_| ¦«dS)z'Perform a TurtleScreen update. TN)r�r,Ú _update_dataÚ _drawturtlerµ)rÌÚtracingrús r¯r-zTurtleScreen.updates`€ð”-ˆØˆŒ Ø—’‘”ð ð ˆAØ �NŠNÑ Ô Ð Ø �MŠM‰OŒOˆOˆO؈Œ Ø � Š ‰ŒˆˆˆrÆcó6—| ¦«dS)z› Return the width of the turtle window. Example (for a TurtleScreen instance named screen): >>> screen.window_width() 640 r©r"rÙs r¯r/zTurtleScreen.window_widthó€ð× Ò Ñ"Ô" 1Ô%Ð%rÆcó6—| ¦«dS)z� Return the height of the turtle window. Example (for a TurtleScreen instance named screen): >>> screen.window_height() 480 rÉrÎrÙs r¯r.zTurtleScreen.window_height&rÏrÆcó—|jS)zçReturn the Canvas of this TurtleScreen. No argument. Example (for a Screen instance named screen): >>> cv = screen.getcanvas() >>> cv )rˆrÙs r¯rzTurtleScreen.getcanvas/s €ðŒwˆrÆcóN—t|j ¦«¦«S)zðReturn a list of names of all currently available turtle shapes. No argument. Example (for a TurtleScreen instance named screen): >>> screen.getshapes() ['arrow', 'blank', 'circle', ... , 'turtle'] )Úsortedr~rÿrÙs r¯rzTurtleScreen.getshapes;s €õ�d”l×'Ò'Ñ)Ô)Ñ*Ô*Ð*rÆrÉcó4—| |||¦«dS)aêBind fun to mouse-click event on canvas. Arguments: fun -- a function with two arguments, the coordinates of the clicked point on the canvas. btn -- the number of the mouse-button, defaults to 1 Example (for a TurtleScreen instance named screen) >>> screen.onclick(goto) >>> # Subsequently clicking into the TurtleScreen will >>> # make the turtle move to the clicked point. >>> screen.onclick(None) N)rë©rÌrØr‘ràs r¯rSzTurtleScreen.onclickFs"€ð ×Ò˜C  cÑ*Ô*Ð*Ð*Ð*rÆcóÄ—|€$||jvr|j |¦«n#||jvr|j |¦«| ||¦«dS)amBind fun to key-release event of key. Arguments: fun -- a function with no arguments key -- a string: key (e.g. "a") or key-symbol (e.g. "space") In order to be able to register key-events, TurtleScreen must have focus. (See method listen.) Example (for a TurtleScreen instance named screen): >>> def f(): ... fd(50) ... lt(60) ... >>> screen.onkey(f, "Up") >>> screen.listen() Subsequently the turtle can be moved by repeatedly pressing the up-arrow key, consequently drawing a hexagon N)rƒÚremoveržrñ©rÌrØr­s r¯rzTurtleScreen.onkeyWsl€ð. ˆ;Ø�d”jÐ Ð Ø” ×!Ò! #Ñ&Ô&Ð&øØ ˜œ Ð "Ð "Ø ŒJ× Ò ˜cÑ "Ô "Ð "Ø ×Ò˜3 Ñ$Ô$Ð$Ð$Ð$rÆcóÈ—|€$||jvr|j |¦«n%|�#||jvr|j |¦«| ||¦«dS)aBind fun to key-press event of key if key is given, or to any key-press-event if no key is given. Arguments: fun -- a function with no arguments key -- a string: key (e.g. "a") or key-symbol (e.g. "space") In order to be able to register key-events, TurtleScreen must have focus. (See method listen.) Example (for a TurtleScreen instance named screen and a Turtle instance named turtle): >>> def f(): ... fd(50) ... lt(60) ... >>> screen.onkeypress(f, "Up") >>> screen.listen() Subsequently the turtle can be moved by repeatedly pressing the up-arrow key, or by keeping pressed the up-arrow key. consequently drawing a hexagon. N)rƒr×ržrôrØs r¯r zTurtleScreen.onkeypressusp€ð2 ˆ;Ø�d”jÐ Ð Ø” ×!Ò! #Ñ&Ô&Ð&øØ ˆ_ ¨D¬JÐ!6Ð!6Ø ŒJ× Ò ˜cÑ "Ô "Ð "Ø ×Ò˜˜cÑ"Ô"Ð"Ð"Ð"rÆcó.—| ¦«dS)aSet focus on TurtleScreen (in order to collect key-events) No arguments. Dummy arguments are provided in order to be able to pass listen to the onclick method. Example (for a TurtleScreen instance named screen): >>> screen.listen() N)rö)rÌÚxdummyÚydummys r¯rzTurtleScreen.listen•s€ð � Š ‰ŒˆˆˆrÆrcó2—| ||¦«dS)aïInstall a timer, which calls fun after t milliseconds. Arguments: fun -- a function with no arguments. t -- a number >= 0 Example (for a TurtleScreen instance named screen): >>> running = True >>> def f(): ... if running: ... fd(50) ... lt(60) ... screen.ontimer(f, 250) ... >>> f() # makes the turtle marching around >>> running = False N)rûrùs r¯r#zTurtleScreen.ontimer¡s€ð& � Š �c˜1ÑÔÐÐÐrÆcó¾—|€|jS||jvr| |¦«|j|<| |j|j|¦«||_dS)aFSet background image or return name of current backgroundimage. Optional argument: picname -- a string, name of a gif-file or "nopic". If picname is a filename, set the corresponding image as background. If picname is "nopic", delete backgroundimage, if present. If picname is None, return the filename of the current backgroundimage. Example (for a TurtleScreen instance named screen): >>> screen.bgpic() 'nopic' >>> screen.bgpic("landscape.gif") >>> screen.bgpic() 'landscape.gif' N)rŒrrŽrr‹)rÌÚpicnames r¯rzTurtleScreen.bgpic¶s^€ð" ˆ?Ø”?Ð "Ø ˜$œ,Ð &Ð &Ø$(§K¢K°Ñ$8Ô$8ˆDŒL˜Ñ !Ø �Š�t”{ D¤L°Ô$9Ñ:Ô:Ð:Ø!ˆŒˆˆrÆcó0—| |||¦«S)aÖResize the canvas the turtles are drawing on. Optional arguments: canvwidth -- positive integer, new width of canvas in pixels canvheight -- positive integer, new height of canvas in pixels bg -- colorstring or color-tuple, new backgroundcolor If no arguments are given, return current (canvaswidth, canvasheight) Do not alter the drawing window. To observe hidden parts of the canvas use the scrollbars. (Can make visible those parts of a drawing, which were outside the canvas before!) Example (for a Turtle instance named turtle): >>> turtle.screensize(2000,1500) >>> # e.g. to search for an erroneously escaped turtle ;-) )r rLs r¯r&zTurtleScreen.screensizeÎs€ð"�|Š|˜I z°2Ñ6Ô6Ð6rÆrÀ©NNr1©rrg)%rìrírîrïrÇr¶r1r6rr(r$r³r»rrar,rr+rrÈr-r/r.rrrSrr rr#rr&r"r%rrr!rèrÆr¯r r ¼s€€€€€ððð €Hà $ V¤ Ø  Ô,°D¸´Mð&Fð&Fð&Fð&FðPððð< ð ð ð ðD%ð%ð%ðN!#ð!#ð!#ð!#ðF+ð+ð+ð6 :ð :ð :ð)ð)ð)ð)ð* ð ð ððððððð.ðððð8 &ð &ð &ð &ð1ð1ð1ð ð ð ð&ð&ð&ð&ð&ð&ð ð ð ð +ð +ð +ð+ð+ð+ð+ð"%ð%ð%ð<#ð#ð#ð#ð@ ð ð ð ððððð*"ð"ð"ð"ð07ð7ð7ð7ð&€MØ€KØ€KØ€HØ€L€L€LrÆr cóH—eZdZdZedd¦«edd¦«edd¦«dœZdZdZdZefd„Z d „Z d&d „Z d „Z d'd„Z d„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd&d„Zd„Zd„Zd„Zd&d„Zd&d„Zd „Zd!„Z d(d"„Z!d)d#„Z"d(d$„Z#d&d%„Z$eZ%eZ&eZ'eZ(eZ)eZ*eZ+eZ,e Z-d S)*Ú TNavigatorzRNavigation part of the RawTurtle. Implements methods for turtle movement. r‰ç)rˆr•r”rˆrrÉcóæ—|j|_|j|_||_d|_| ¦«d|_| |¦«t  |¦«dSrÀ) ÚDEFAULT_ANGLEOFFSETÚ _angleOffsetÚDEFAULT_ANGLEORIENTÚ _angleOrientr€Ú undobufferr;r¿rärar–s r¯r1zTNavigator.__init__ósf€Ø Ô4ˆÔØ Ô4ˆÔ؈Œ ؈ŒØ � Š ‰ŒˆØˆŒ Ø � Š �dÑÔÐÝ×Ò˜ÑÔÐÐÐrÆcóh—tdd¦«|_tj|j|_dS)zXreset turtle to its initial values Will be overwritten by parent class råN)rÚ _positionräÚSTART_ORIENTATIONr€Ú_orientrÙs r¯razTNavigator.resetýs(€õ ˜s C™œˆŒÝ"Ô4°T´ZÔ@ˆŒ ˆ ˆ rÆNcó†—|€|jS|dvrdS||_|dvrd|_d|_dS|jdz |_d|_dS)z:Set turtle-mode to 'standard', 'world' or 'logo'. Nr“)rˆr•rrÉç@r)r€rèrêÚ _fullcircler–s r¯r¿zTNavigator._setmodesi€ð ˆ<Ø”:Ð Ø Ð4Ð 4Ð 4Ø ˆF؈Œ Ø Ð(Ð (Ð (Ø !ˆDÔ Ø !ˆDÔ Ð Ð à $Ô 0°Ñ 3ˆDÔ Ø "ˆDÔ Ð Ð rÆcód—||_d|z |_|jdkr d|_dS|dz |_dS)z+Helper function for degrees() and radians()ihrˆrrñN)ròÚ _degreesPerAUr€rè©rÌÚ fullcircles r¯Ú_setDegreesPerAUzTNavigator._setDegreesPerAUsC€à%ˆÔØ  ™^ˆÔØ Œ:˜Ò #Ð #Ø !ˆDÔ Ð Ð à *¨2¡ ˆDÔ Ð Ð rÆç€v@có0—| |¦«dS)a> Set angle measurement units to degrees. Optional argument: fullcircle - a number Set angle measurement units, i. e. set number of 'degrees' for a full circle. Default value is 360 degrees. Example (for a Turtle instance named turtle): >>> turtle.left(90) >>> turtle.heading() 90 Change angle measurement unit to grad (also known as gon, grade, or gradian and equals 1/100-th of the right angle.) >>> turtle.degrees(400.0) >>> turtle.heading() 100 N)r÷rõs r¯r;zTNavigator.degreess€ð, ×Ò˜jÑ)Ô)Ð)Ð)Ð)rÆcóD—| tj¦«dS)a Set the angle measurement units to radians. No arguments. Example (for a Turtle instance named turtle): >>> turtle.heading() 90 >>> turtle.radians() >>> turtle.heading() 1.5707963267948966 N)r÷rÜÚtaurÙs r¯r_zTNavigator.radians5s €ð ×Ò�dœhÑ'Ô'Ð'Ð'Ð'rÆcóT—|j|j|zz}| |¦«dS)z)move turtle forward by specified distanceN)rírïÚ_goto)rÌr<Úendes r¯Ú_gozTNavigator._goCs-€àŒ~ ¤ ¨xÑ 7Ñ7ˆØ � Š �4ÑÔÐÐÐrÆcóX—||jz}|j |¦«|_dS)z=Turn turtle counterclockwise by specified angle if angle > 0.N)rôrïræ©rÌrâs r¯Ú_rotatezTNavigator._rotateHs*€à �Ô#Ñ#ˆØ”|×*Ò*¨5Ñ1Ô1ˆŒ ˆ ˆ rÆcó—||_dS)zmove turtle to position end.N©rí)rÌÚends r¯rýzTNavigator._gotoMs €àˆŒˆˆrÆcó0—| |¦«dS)aMove the turtle forward by the specified distance. Aliases: forward | fd Argument: distance -- a number (integer or float) Move the turtle forward by the specified distance, in the direction the turtle is headed. Example (for a Turtle instance named turtle): >>> turtle.position() (0.00, 0.00) >>> turtle.forward(25) >>> turtle.position() (25.00,0.00) >>> turtle.forward(-75) >>> turtle.position() (-50.00,0.00) N©rÿ©rÌr<s r¯rDzTNavigator.forwardQs€ð* �Š�ÑÔÐÐÐrÆcó2—| | ¦«dS)aÏMove the turtle backward by distance. Aliases: back | backward | bk Argument: distance -- a number Move the turtle backward by distance, opposite to the direction the turtle is headed. Do not change the turtle's heading. Example (for a Turtle instance named turtle): >>> turtle.position() (0.00, 0.00) >>> turtle.backward(30) >>> turtle.position() (-30.00, 0.00) Nrrs r¯r0zTNavigator.backhs€ð$ �Š�(�ÑÔÐÐÐrÆcó2—| | ¦«dS)aôTurn turtle right by angle units. Aliases: right | rt Argument: angle -- a number (integer or float) Turn turtle right by angle units. (Units are by default degrees, but can be set via the degrees() and radians() functions.) Angle orientation depends on mode. (See this.) Example (for a Turtle instance named turtle): >>> turtle.heading() 22.0 >>> turtle.right(45) >>> turtle.heading() 337.0 N©rrs r¯r`zTNavigator.right|s€ð& � Š �e�VÑÔÐÐÐrÆcó0—| |¦«dS)aïTurn turtle left by angle units. Aliases: left | lt Argument: angle -- a number (integer or float) Turn turtle left by angle units. (Units are by default degrees, but can be set via the degrees() and radians() functions.) Angle orientation depends on mode. (See this.) Example (for a Turtle instance named turtle): >>> turtle.heading() 22.0 >>> turtle.left(45) >>> turtle.heading() 67.0 Nr rs r¯rQzTNavigator.left‘s€ð& � Š �UÑÔÐÐÐrÆcó—|jS)zæReturn the turtle's current location (x,y), as a Vec2D-vector. Aliases: pos | position No arguments. Example (for a Turtle instance named turtle): >>> turtle.pos() (0.00, 240.00) rrÙs r¯r\zTNavigator.pos¦s €ðŒ~ÐrÆcó—|jdS)zö Return the turtle's x coordinate. No arguments. Example (for a Turtle instance named turtle): >>> reset() >>> turtle.left(60) >>> turtle.forward(100) >>> print turtle.xcor() 50.0 rrrÙs r¯r}zTNavigator.xcor³ó€ðŒ~˜aÔ Ð rÆcó—|jdS)a  Return the turtle's y coordinate --- No arguments. Example (for a Turtle instance named turtle): >>> reset() >>> turtle.left(60) >>> turtle.forward(100) >>> print turtle.ycor() 86.6025403784 rÉrrÙs r¯r~zTNavigator.ycorÁrrÆcóŒ—|€| t|ަ«dS| t||¦«¦«dS)atMove turtle to an absolute position. Aliases: setpos | setposition | goto: Arguments: x -- a number or a pair/vector of numbers y -- a number None call: goto(x, y) # two coordinates --or: goto((x, y)) # a pair (tuple) of coordinates --or: goto(vec) # e.g. as returned by pos() Move turtle to an absolute position. If the pen is down, a line will be drawn. The turtle's orientation does not change. Example (for a Turtle instance named turtle): >>> tp = turtle.pos() >>> tp (0.00, 0.00) >>> turtle.setpos(60,30) >>> turtle.pos() (60.00,30.00) >>> turtle.setpos((20,80)) >>> turtle.pos() (20.00,80.00) >>> turtle.setpos(tp) >>> turtle.pos() (0.00,0.00) N)rýr)rÌrÄrÅs r¯rJzTNavigator.gotoÐsE€ð< ˆ9Ø �JŠJ•u˜a�yÑ !Ô !Ð !Ð !Ð !à �JŠJ•u˜Q ‘{”{Ñ #Ô #Ð #Ð #Ð #rÆcó\—| dd¦«| d¦«dS)a$Move turtle to the origin - coordinates (0,0). No arguments. Move turtle to the origin - coordinates (0,0) and set its heading to its start-orientation (which depends on mode). Example (for a Turtle instance named turtle): >>> turtle.home() rN)rJrerÙs r¯rMzTNavigator.homeós-€ð � Š �!�Q‰ŒˆØ �Š˜ÑÔÐÐÐrÆcób—| t||jd¦«¦«dS)a…Set the turtle's first coordinate to x Argument: x -- a number (integer or float) Set the turtle's first coordinate to x, leave second coordinate unchanged. Example (for a Turtle instance named turtle): >>> turtle.position() (0.00, 240.00) >>> turtle.setx(10) >>> turtle.position() (10.00, 240.00) rÉN©rýrrí)rÌrÄs r¯rjzTNavigator.setxs-€ð � Š •5˜˜DœN¨1Ô-Ñ.Ô.Ñ/Ô/Ð/Ð/Ð/rÆcób—| t|jd|¦«¦«dS)a‡Set the turtle's second coordinate to y Argument: y -- a number (integer or float) Set the turtle's first coordinate to x, second coordinate remains unchanged. Example (for a Turtle instance named turtle): >>> turtle.position() (0.00, 40.00) >>> turtle.sety(-10) >>> turtle.position() (0.00, -10.00) rNr)rÌrÅs r¯rkzTNavigator.setys-€ð � Š •5˜œ¨Ô*¨AÑ.Ô.Ñ/Ô/Ð/Ð/Ð/rÆcóú—|�t||¦«}t|t¦«r|}n;t|t¦«r t|Ž}nt|t¦«r|j}t ||jz ¦«S)aëReturn the distance from the turtle to (x,y) in turtle step units. Arguments: x -- a number or a pair/vector of numbers or a turtle instance y -- a number None None call: distance(x, y) # two coordinates --or: distance((x, y)) # a pair (tuple) of coordinates --or: distance(vec) # e.g. as returned by pos() --or: distance(mypen) # where mypen is another turtle Example (for a Turtle instance named turtle): >>> turtle.pos() (0.00, 0.00) >>> turtle.distance(30,40) 50.0 >>> pen = Turtle() >>> pen.forward(77) >>> turtle.distance(pen) 77.0 )rrÑrÁräríÚabs)rÌrÄrÅr\s r¯r<zTNavigator.distance%sz€ð, ˆ=ݘ˜1‘+”+ˆCÝ �a�Ñ Ô ð ØˆCˆCÝ ˜�5Ñ !Ô !ð ݘ�)ˆCˆCÝ ˜�:Ñ &Ô &ð Ø”+ˆCÝ�3˜œÑ'Ñ(Ô(Ð(rÆcóž—|�t||¦«}t|t¦«r|}n;t|t¦«r t|Ž}nt|t¦«r|j}||jz \}}t t jt j||¦«¦«d¦«dz}||j z}|j |j |zz|j zS)aCReturn the angle of the line from the turtle's position to (x, y). Arguments: x -- a number or a pair/vector of numbers or a turtle instance y -- a number None None call: distance(x, y) # two coordinates --or: distance((x, y)) # a pair (tuple) of coordinates --or: distance(vec) # e.g. as returned by pos() --or: distance(mypen) # where mypen is another turtle Return the angle, between the line from turtle-position to position specified by x, y and the turtle's start orientation. (Depends on modes - "standard" or "logo") Example (for a Turtle instance named turtle): >>> turtle.pos() (10.00, 10.00) >>> turtle.towards(0,0) 225.0 NrŠrø) rrÑrÁrärírªrÜr;Úatan2rôrèrêrò)rÌrÄrÅr\Úresults r¯rvzTNavigator.towardsEsÊ€ð, ˆ=ݘ˜1‘+”+ˆCÝ �a�Ñ Ô ð ØˆCˆCÝ ˜�5Ñ !Ô !ð ݘ�)ˆCˆCÝ ˜�:Ñ &Ô &ð Ø”+ˆCØ�T”^Ñ#‰ˆˆ1Ý•t”|¥D¤J¨q°!Ñ$4Ô$4Ñ5Ô5°rÑ:Ô:¸UÑBˆØ�$Ô$Ñ$ˆØÔ! DÔ$5°fÑ$<Ñ<ÀÔ@PÑPÐPrÆcóΗ|j\}}ttjtj||¦«¦«d¦«dz}||jz}|j|j|zz|jzS)z Return the turtle's current heading. No arguments. Example (for a Turtle instance named turtle): >>> turtle.left(67) >>> turtle.heading() 67.0 rŠrø) rïrªrÜr;rrôrèrêrò)rÌrÄrÅrs r¯rKzTNavigator.headinghsd€ðŒ|‰ˆˆ1Ý•t”|¥D¤J¨q°!Ñ$4Ô$4Ñ5Ô5°rÑ:Ô:¸UÑBˆØ�$Ô$Ñ$ˆØÔ! DÔ$5°fÑ$<Ñ<ÀÔ@PÑPÐPrÆcóž—|| ¦«z |jz}|j}||dz z|z|dz z }| |¦«dS)ažSet the orientation of the turtle to to_angle. Aliases: setheading | seth Argument: to_angle -- a number (integer or float) Set the orientation of the turtle to to_angle. Here are some common directions in degrees: standard - mode: logo-mode: -------------------|-------------------- 0 - east 0 - north 90 - north 90 - east 180 - west 180 - south 270 - south 270 - west Example (for a Turtle instance named turtle): >>> turtle.setheading(90) >>> turtle.heading() 90 ç@N)rKrêròr)rÌÚto_anglerâÚfulls r¯rezTNavigator.setheadingwsY€ð.˜DŸLšL™NœNÑ*¨DÔ,=Ñ=ˆØÔˆØ�t˜B‘w‘ Ñ$ t¨B¡wÑ.ˆØ � Š �UÑÔÐÐÐrÆc ó<—|jr'|j dg¦«d|j_| ¦«}|€|j}|€Mt |¦«|jz }dt tdt |¦«dz zd¦«|z¦«z}d|z|z }d |z}d |ztj tj |¦«|j z¦«z}|d kr | | | }}}|  ¦«} |  ¦«} |d kr|  d d ¦«n| d ¦«| |¦«t|¦«D]V} | |¦«| |¦«| d ¦«| |¦«ŒW| | ¦«|d kr|  | | ¦«| |¦«|jrd |j_dSdS) aë Draw a circle with given radius. Arguments: radius -- a number extent (optional) -- a number steps (optional) -- an integer Draw a circle with given radius. The center is radius units left of the turtle; extent - an angle - determines which part of the circle is drawn. If extent is not given, draw the entire circle. If extent is not a full circle, one endpoint of the arc is the current pen position. Draw the arc in counterclockwise direction if radius is positive, otherwise in clockwise direction. Finally the direction of the turtle is changed by the amount of extent. As the circle is approximated by an inscribed regular polygon, steps determines the number of steps to use. If not given, it will be calculated automatically. Maybe used to draw regular polygons. call: circle(radius) # full circle --or: circle(radius, extent) # arc --or: circle(radius, extent, steps) --or: circle(radius, steps=6) # 6-sided polygon Example (for a Turtle instance named turtle): >>> turtle.circle(50) >>> turtle.circle(120, 180) # semicircle ÚseqTNrÉé g@g€M@r‰r‚rrF)rërLrIrqròrr§ÚminrÜrár_rôÚ_tracerr¹rrrÿ) rÌÚradiusÚextentÚstepsrqÚfracr“Úw2ÚlÚtrÚdlr s r¯r5zTNavigator.circle“s€ð< Œ?ð ,Ø ŒO× Ò  % Ñ )Ô )Ð )Ø'+ˆDŒOÔ $Ø— ’ ‘ ” ˆØ ˆ>ØÔ%ˆFØ ˆ=Ý�v‘;”;˜tÔ/Ñ/ˆDØ•c�#˜b¥ V¡¤¨S¡Ñ0°$Ñ7Ô7¸Ñ<Ñ=Ô=Ñ=ˆEØ �&‰L˜5Ñ ˆØ �1‰WˆØ �&‰L�4œ8¥D¤L°Ñ$4Ô$4°TÔ5GÑ$GÑHÔHÑ HˆØ �AŠ:ˆ:Ø�r˜A˜2 ˜s�"ˆqˆAØ �\Š\‰^Œ^ˆØ �[Š[‰]Œ]ˆØ �AŠ:ˆ:Ø �LŠL˜˜AÑ Ô Ð Ð à �JŠJ�q‰MŒMˆMØ � Š �RÑÔÐÝ�u‘”ð ð ˆAØ �JŠJ�uÑ Ô Ð Ø �HŠH�Q‰KŒKˆKØ �JŠJ�q‰MŒMˆMØ �LŠL˜‰OŒOˆOˆOØ � Š �b�SÑÔÐØ �AŠ:ˆ:Ø �LŠL˜˜RÑ Ô Ð Ø � Š �5ÑÔÐØ Œ?ð -Ø',ˆDŒOÔ $Ð $Ð $ð -ð -rÆcó—dS©z/dummy method - to be overwritten by child classNrè)rÌrås r¯rqzTNavigator.speedÔó€€€rÆcó—dSr.rè)rÌÚar²s r¯r$zTNavigator._tracerÖr/rÆcó—dSr.rè)rÌrÄs r¯r¹zTNavigator._delayØr/rÆrÀ)rørárâ).rìrírîrïrrîÚ DEFAULT_MODErçrér1rar¿r÷r;r_rÿrrýrDr0r`rQr\r}r~rJrMrjrkr<rvrKrer5rqr$r¹rAr4r1rcrRr]rfrgrdrèrÆr¯räräçsw€€€€€ððð�E˜#˜s‘O”OØ�E˜#˜s‘O”OØ�E˜#˜s‘O”Oð'ð'Ðð€LØÐØÐà(ðððððAðAðAð #ð #ð #ð #ð.ð.ð.ð*ð*ð*ð*ð0 (ð (ð (ðððð 2ð2ð2ð ðððððð.ððð(ððð*ððð* ð ð ð !ð !ð !ð !ð !ð !ð!$ð!$ð!$ð!$ðF ð ð ð0ð0ð0ð$0ð0ð0ð$)ð)ð)ð)ð@!Qð!Qð!Qð!QðF Qð Qð Qðððð8=-ð=-ð=-ð=-ðB>ð>ð>ð>ð>ð>ð>ð>ð>ð>ð>ð>ð €BØ €BØ€HØ €BØ €BØ€HØ €FØ€KØ €D€D€DrÆräcóÚ—eZdZdZedfd„Zededfd„Zdd„Zdd „Zd „Z d „Z d „Z dd „Z d„Z d„Zd„Zd„Zd„Zd„Zdd„Zdd„Zdd„Zd„Zd„ZeZe Ze Ze Ze ZeZeZdS)ÚTPenzFDrawing part of the RawTurtle. Implements drawing properties. rbcóV—||_d|_t |¦«dSrÀ)Ú _resizemoderër5Ú_reset)rÌrbs r¯r1z TPen.__init__ês)€Ø%ˆÔ؈ŒÝ � Š �DÑÔÐÐÐrÆrXrBcó —d|_d|_||_||_d|_d|_d|_d|_d|_d|_ d|_ dS)NrÉTrŠ)r‰r‰rå)r‰rårår‰) Ú_pensizeÚ_shownÚ _pencolorÚ _fillcolorÚ_drawingÚ_speedÚ_stretchfactorÚ _shearfactorÚ_tiltÚ _shapetrafoÚ _outlinewidth)rÌrXrBs r¯r8z TPen._resetïsY€àˆŒ ؈Œ Ø!ˆŒØ#ˆŒØˆŒ ؈Œ Ø&ˆÔØˆÔØˆŒ Ø+ˆÔ؈ÔÐÐrÆNcóx—|€|jS| ¦«}|dvr| |¬¦«dSdS)azSet resizemode to one of the values: "auto", "user", "noresize". (Optional) Argument: rmode -- one of the strings "auto", "user", "noresize" Different resizemodes have the following effects: - "auto" adapts the appearance of the turtle corresponding to the value of pensize. - "user" adapts the appearance of the turtle according to the values of stretchfactor and outlinewidth (outline), which are set by shapesize() - "noresize" no adaption of the turtle's appearance takes place. If no argument is given, return current resizemode. resizemode("user") is called by a call of shapesize with arguments. Examples (for a Turtle instance named turtle): >>> turtle.resizemode("noresize") >>> turtle.resizemode() 'noresize' N)ÚautoÚuserrŽ©rb)r7r;rW)rÌÚrmodes r¯rbzTPen.resizemodeýsM€ð, ˆ=ØÔ#Ð #Ø— ’ ‘ ” ˆØ Ð0Ð 0Ð 0Ø �HŠH ˆHÑ &Ô &Ð &Ð &Ð &ð 1Ð 0rÆcóD—|€|jS| |¬¦«dS)a!Set or return the line thickness. Aliases: pensize | width Argument: width -- positive number Set the line thickness to width or return it. If resizemode is set to "auto" and turtleshape is a polygon, that polygon is drawn with the same line thickness. If no argument is given, current pensize is returned. Example (for a Turtle instance named turtle): >>> turtle.pensize() 1 >>> turtle.pensize(10) # from here on lines of width 10 are drawn N)rZ)r:rW)rÌr{s r¯rZz TPen.pensizes+€ð$ ˆ=Ø”=Ð Ø �Š˜ˆÑÔÐÐÐrÆcóD—|jsdS| d¬¦«dS)z¼Pull the pen up -- no drawing when moving. Aliases: penup | pu | up No argument Example (for a Turtle instance named turtle): >>> turtle.penup() NF©rY©r>rWrÙs r¯r[z TPen.penup0s-€ðŒ}ð Ø ˆFØ �Š˜ˆÑÔÐÐÐrÆcóD—|jrdS| d¬¦«dS)zÂPull the pen down -- drawing when moving. Aliases: pendown | pd | down No argument. Example (for a Turtle instance named turtle): >>> turtle.pendown() NTrLrMrÙs r¯rYz TPen.pendown>s-€ð Œ=ð Ø ˆFØ �Š˜ˆÑÔÐÐÐrÆcó—|jS)aReturn True if pen is down, False if it's up. No argument. Example (for a Turtle instance named turtle): >>> turtle.penup() >>> turtle.isdown() False >>> turtle.pendown() >>> turtle.isdown() True )r>rÙs r¯rOz TPen.isdownLs €ðŒ}ÐrÆcóÌ—ddddddœ}|€|jS||vr ||}n/d|cxkrd kr nntt|¦«¦«}nd}| |¬ ¦«dS) a¤ Return or set the turtle's speed. Optional argument: speed -- an integer in the range 0..10 or a speedstring (see below) Set the turtle's speed to an integer value in the range 0 .. 10. If no argument is given: return current speed. If input is a number greater than 10 or smaller than 0.5, speed is set to 0. Speedstrings are mapped to speedvalues in the following way: 'fastest' : 0 'fast' : 10 'normal' : 6 'slow' : 3 'slowest' : 1 speeds from 1 to 10 enforce increasingly faster animation of line drawing and turtle turning. Attention: speed = 0 : *no* animation takes place. forward/back makes turtle jump and likewise left/right make the turtle turn instantly. Example (for a Turtle instance named turtle): >>> turtle.speed(3) rrŠrjrŠrÉ)ÚfastestÚfastÚnormalÚslowÚslowestNr‚g%@)rq)r?r§rªrW)rÌrqÚspeedss r¯rqz TPen.speed[sŽ€ð6 b°1¸QÈ!ÐMÐMˆØ ˆ=Ø”;Ð Ø �Fˆ?ˆ?ؘ5”MˆEˆEØ �5Ð Ð Ò Ð ˜4Ò Ð Ð Ð Ð Ý�˜e™ œ Ñ%Ô%ˆEˆEàˆEØ �Š�uˆÑÔÐÐÐrÆcó`—|ryt|¦«}|dkr |dx}}n|dkr|\}}n |dkr|x}}| |¦«}| |¦«}| ||¬¦«dS| |j¦«| |j¦«fS)a›Return or set the pencolor and fillcolor. Arguments: Several input formats are allowed. They use 0, 1, 2, or 3 arguments as follows: color() Return the current pencolor and the current fillcolor as a pair of color specification strings as are returned by pencolor and fillcolor. color(colorstring), color((r,g,b)), color(r,g,b) inputs as in pencolor, set both, fillcolor and pencolor, to the given value. color(colorstring1, colorstring2), color((r1,g1,b1), (r2,g2,b2)) equivalent to pencolor(colorstring1) and fillcolor(colorstring2) and analogously, if the other input format is used. If turtleshape is a polygon, outline and interior of that polygon is drawn with the newly set colors. For more info see: pencolor, fillcolor Example (for a Turtle instance named turtle): >>> turtle.color('red', 'green') >>> turtle.color() ('red', 'green') >>> colormode(255) >>> color((40, 80, 120), (160, 200, 240)) >>> color() ('#285078', '#a0c8f0') rÉrrrŠ)rXrBN)rr³rWr»r<r=)rÌrZr*ÚpcolorÚfcolors r¯r:z TPen.color�s¾€ð@ ð MÝ�D‘ ” ˆAØ�AŠvˆvØ"& q¤'Ð)�˜˜Ø�a’�Ø!%‘�˜˜Ø�a’�Ø"&Ð&�˜Ø—^’^ FÑ+Ô+ˆFØ—^’^ FÑ+Ô+ˆFØ �HŠH˜f°ˆHÑ 7Ô 7Ð 7Ð 7Ð 7à—;’;˜tœ~Ñ.Ô.°· ² ¸D¼OÑ0LÔ0LÐLÐ LrÆcó®—|r:| |¦«}||jkrdS| |¬¦«dS| |j¦«S)aZ Return or set the pencolor. Arguments: Four input formats are allowed: - pencolor() Return the current pencolor as color specification string, possibly in hex-number format (see example). May be used as input to another color/pencolor/fillcolor call. - pencolor(colorstring) s is a Tk color specification string, such as "red" or "yellow" - pencolor((r, g, b)) *a tuple* of r, g, and b, which represent, an RGB color, and each of r, g, and b are in the range 0..colormode, where colormode is either 1.0 or 255 - pencolor(r, g, b) r, g, and b represent an RGB color, and each of r, g, and b are in the range 0..colormode If turtleshape is a polygon, the outline of that polygon is drawn with the newly set pencolor. Example (for a Turtle instance named turtle): >>> turtle.pencolor('brown') >>> tup = (0.2, 0.8, 0.55) >>> turtle.pencolor(tup) >>> turtle.pencolor() '#33cc8c' N)rX)r³r<rWr»rÂs r¯rXz TPen.pencolor¯s]€ð: ð /Ø—N’N 4Ñ(Ô(ˆEؘœÒ&Ð&Ø�Ø �HŠH˜eˆHÑ $Ô $Ð $Ð $Ð $à—;’;˜tœ~Ñ.Ô.Ð .rÆcó®—|r:| |¦«}||jkrdS| |¬¦«dS| |j¦«S)a] Return or set the fillcolor. Arguments: Four input formats are allowed: - fillcolor() Return the current fillcolor as color specification string, possibly in hex-number format (see example). May be used as input to another color/pencolor/fillcolor call. - fillcolor(colorstring) s is a Tk color specification string, such as "red" or "yellow" - fillcolor((r, g, b)) *a tuple* of r, g, and b, which represent, an RGB color, and each of r, g, and b are in the range 0..colormode, where colormode is either 1.0 or 255 - fillcolor(r, g, b) r, g, and b represent an RGB color, and each of r, g, and b are in the range 0..colormode If turtleshape is a polygon, the interior of that polygon is drawn with the newly set fillcolor. Example (for a Turtle instance named turtle): >>> turtle.fillcolor('violet') >>> col = turtle.pencolor() >>> turtle.fillcolor(col) >>> turtle.fillcolor(0, .5, 0) N)rB)r³r=rWr»rÂs r¯rBzTPen.fillcolorÔs]€ð8 ð 0Ø—N’N 4Ñ(Ô(ˆEؘœÒ'Ð'Ø�Ø �HŠH˜uˆHÑ %Ô %Ð %Ð %Ð %à—;’;˜tœÑ/Ô/Ð /rÆcó2—| d¬¦«dS)zÑMakes the turtle visible. Aliases: showturtle | st No argument. Example (for a Turtle instance named turtle): >>> turtle.hideturtle() >>> turtle.showturtle() T©ÚshownN©rWrÙs r¯rpzTPen.showturtleøs€ð �Š�tˆÑÔÐÐÐrÆcó2—| d¬¦«dS)aYMakes the turtle invisible. Aliases: hideturtle | ht No argument. It's a good idea to do this while you're in the middle of a complicated drawing, because hiding the turtle speeds up the drawing observably. Example (for a Turtle instance named turtle): >>> turtle.hideturtle() Fr]Nr_rÙs r¯rLzTPen.hideturtle s€ð �Š�uˆÑÔÐÐÐrÆcó—|jS)zãReturn True if the Turtle is shown, False if it's hidden. No argument. Example (for a Turtle instance named turtle): >>> turtle.hideturtle() >>> print turtle.isvisible(): False )r;rÙs r¯rPzTPen.isvisible s €ðŒ{ÐrÆc óΗ|j|j|j|j|j|j|j|j|j|j |j dœ }|s|s|St|t¦«r|}ni}|  |¦«i}|D] }||||<Œ|jr|j d|f¦«d}d|vr|j|dkrd}d|vrMt|dt ¦«r| |df¦«|d<|j|dkrd}d|vr|j|dkrd}|r| ¦«d|vr |d|_d|vr |d|_d|vr |d|_d|vrGt|dt ¦«r| |df¦«|d<|d|_d |vr |d |_d |vr |d |_d |vr/|d }t|t&t(f¦«r||f}||_d |vr |d |_d |vr |d |_ d|vr |d|_d|vr |d|_ d |vsd|vsd |vrg|j\} } |j} t+j|j ¦«t+j|j ¦«} } | | z| | | z| zz| | z| | | | zz zf|_| ¦«dS)aLReturn or set the pen's attributes. Arguments: pen -- a dictionary with some or all of the below listed keys. **pendict -- one or more keyword-arguments with the below listed keys as keywords. Return or set the pen's attributes in a 'pen-dictionary' with the following key/value pairs: "shown" : True/False "pendown" : True/False "pencolor" : color-string or color-tuple "fillcolor" : color-string or color-tuple "pensize" : positive number "speed" : number in range 0..10 "resizemode" : "auto" or "user" or "noresize" "stretchfactor": (positive number, positive number) "shearfactor": number "outline" : positive number "tilt" : number This dictionary can be used as argument for a subsequent pen()-call to restore the former pen-state. Moreover one or more of these attributes can be provided as keyword-arguments. This can be used to set several pen attributes in one statement. Examples (for a Turtle instance named turtle): >>> turtle.pen(fillcolor="black", pencolor="red", pensize=10) >>> turtle.pen() {'pensize': 10, 'shown': True, 'resizemode': 'auto', 'outline': 1, 'pencolor': 'red', 'pendown': True, 'fillcolor': 'black', 'stretchfactor': (1,1), 'speed': 3, 'shearfactor': 0.0} >>> penstate=turtle.pen() >>> turtle.color("yellow","") >>> turtle.penup() >>> turtle.pen() {'pensize': 10, 'shown': True, 'resizemode': 'auto', 'outline': 1, 'pencolor': 'yellow', 'pendown': False, 'fillcolor': '', 'stretchfactor': (1,1), 'speed': 3, 'shearfactor': 0.0} >>> p.pen(penstate, fillcolor="green") >>> p.pen() {'pensize': 10, 'shown': True, 'resizemode': 'auto', 'outline': 1, 'pencolor': 'red', 'pendown': True, 'fillcolor': 'green', 'stretchfactor': (1,1), 'speed': 3, 'shearfactor': 0.0} ) r^rYrXrBrZrqrbÚ stretchfactorror—rtrWFrYTrXrZrBrqrbrcror—r^rtN)r;r>r<r=r:r?r7r@rArDrBrÑÚdictr-rërLrÁr³Ú_newLiner§r¦rÜráràrCrµ)rÌrWÚpendictÚ_pdÚpÚ_p_bufr­ÚnewLineÚsfÚscxÚscyÚshfÚsaÚcas r¯rWzTPen.pen! s_€ð^#'¤+Ø"&¤-Ø"&¤.Ø"&¤/Ø"&¤-Ø"&¤+Ø"&Ô"2Ø"&Ô"5Ø"&Ô"3Ø"&Ô"4Ø"&¤*ð ð ˆðð �wð ØˆJå �c�4Ñ Ô ð ØˆAˆAàˆAØ �Š�ÑÔÐàˆØð #ð #ˆCؘcœ(ˆF�3‰KˆKà Œ?ð 2Ø ŒO× Ò  %¨ Ñ 1Ô 1Ð 1àˆØ ˜ˆ>ˆ>ØŒ}  )¤ Ò,Ð,Ø�Ø ˜ˆ?ˆ?ݘ!˜Jœ-­Ñ/Ô/ð AØ $§¢°°*´ Ð/?Ñ @Ô @��*‘ ØŒ~  :¤Ò.Ð.Ø�Ø ˜ˆ>ˆ>ØŒ}  )¤ Ò,Ð,Ø�Ø ð Ø �MŠM‰OŒOˆOØ ˜ˆ>ˆ>ؘiœLˆDŒMØ ˜ˆ?ˆ?ؘzœ]ˆDŒNØ ˜ˆ>ˆ>ؘiœLˆDŒMØ ˜!РРݘ!˜Kœ.­%Ñ0Ô0ð CØ!%§¢°°;´Ð0AÑ!BÔ!B��+‘Ø  œnˆDŒOØ �aˆ<ˆ<ؘGœ*ˆDŒKØ ˜1Ð Ð Ø  œˆDÔ Ø ˜aÐ Ð Ø�?Ô#ˆBݘ"�s¥E˜lÑ+Ô+ð Ø˜"�X�Ø"$ˆDÔ Ø ˜AÐ Ð Ø ! -Ô 0ˆDÔ Ø ˜ˆ>ˆ>Ø!" 9¤ˆDÔ Ø �aˆ<ˆ<ؘGœ*ˆDŒKØ �Qˆ;ˆ;ؘ6œˆDŒJØ ˜aÐ Ð  6¨Q ; ;°-À1Ð2DÐ2DØÔ*‰HˆC�ØÔ#ˆCÝ”X˜dœjÑ)Ô)­4¬8°D´JÑ+?Ô+?�ˆBØ!$ R¡¨¨c°"©f°r©kÑ):Ø!$  R¡¨¨b°3°r±6©kÑ):ð <ˆDÔ à � Š ‰ŒˆˆˆrÆTcó—dSr.rè©rÌÚusePoss r¯rez TPen._newLine  r/rÆFcó—dSr.rè)rÌrPÚforceds r¯rµz TPen._update¢ r/rÆcó—dSr.rèrYs r¯r»z TPen._color¤ r/rÆcó—dSr.rèrYs r¯r³zTPen._colorstr¦ r/rÆrÀ©T)TF)rìrírîrïr¶r1r8rbrZr[rYrOrqr:rXrBrprLrPrWrerµr»r³r{rzr^rVr>rrrNrèrÆr¯r5r5æsª€€€€€ððð#' |Ô"4ððððð # :Ô.Ø# KÔ0ð ð ð ð ð'ð'ð'ð'ð8 ð ð ð ð.  ð  ð  ð ð ð ð ð ð ð$ð$ð$ð$ðL,Mð,Mð,Mð\#/ð#/ð#/ðJ"0ð"0ð"0ðH ð ð ðððð ð ð ð{ð{ð{ð{ð~>ð>ð>ð>ð>ð>ð>ð>ð>ð>ð>ð>ð>ð>ð €EØ €BØ €BØ €BØ €DØ €BØ €B€B€BrÆr5có—eZdZdZd„Zd„ZdS)Ú _TurtleImagez6Helper class: Datatype to store Turtle attributes cóL—||_d|_| |¦«dSrÀ)r”rÚ _setshape)rÌr”Ú shapeIndexs r¯r1z_TurtleImage.__init__¶ s(€ØˆŒ ؈Œ Ø �Š�zÑ"Ô"Ð"Ð"Ð"rÆc󤇗|jŠ||_|jdcxkr‰j|jkrnndS|jdcxkr‰j|jkrnndS|jdvr‰ |j¦«n*|jdkr|jD]}‰ |¦«Œ‰j|j|_|jdkr‰ ¦«|_dS|jdkr,‰ ‰jdj¦«|_dS|jdkr%ˆfd„‰j|jD¦«|_dSdS)Nr8rþ)rþr8r:r‰có8•—g|]}‰ ¦«‘ŒSrè©r™©r r²r”s €r¯r z*_TurtleImage._setshape..Í s7ø€ðLðLðL°4˜&×,Ò,Ñ.Ô.ðLðLðLrÆ) r”r}rr~r³Ú_itemr™rr=)rÌr}r²r”s @r¯r|z_TurtleImage._setshape» sˆø€Ø”ˆØ$ˆŒØ Œ:˜Ð FÐ FÒ FÐ F f¤n°ZÔ&@Ô&FÒ FÐ FÐ FÐ FÐ FØ ˆFØ Œ:˜Ð DÐ DÒ DÐ D F¤N°:Ô$>Ô$DÒ DÐ DÐ DÐ DÐ DØ ˆFØ Œ:Ð-Ð -Ð -Ø �NŠN˜4œ:Ñ &Ô &Ð &Ð &Ø ŒZ˜:Ò %Ð %Øœ ð %ð %�Ø—’˜tÑ$Ô$Ð$Ð$Ø”^ JÔ/Ô5ˆŒ Ø Œ:˜Ò "Ð "Ø×+Ò+Ñ-Ô-ˆDŒJˆJˆJØ ŒZ˜7Ò "Ð "Ø×,Ò,¨V¬^¸GÔ-DÔ-JÑKÔKˆDŒJˆJˆJØ ŒZ˜:Ò %Ð %ðLðLðLðLØ*0¬.¸Ô*DÔ*JðLñLôLˆDŒJˆJˆJð&Ð %rÆN)rìrírîrïr1r|rèrÆr¯rzrz² sA€€€€€ððð#ð#ð#ð LðLðLðLðLrÆrzcó�—eZdZdZgZdedededfd„Zd„Zd„Zd „Z d „Z d „Z d „Z d „Z dd„Zd=d„Zd„Zd=d„Zd„Zd?d„Zd„Zd„Zd@d„Zd„Zd„Zd „Zd!„Z d=d"„Z!d#„Z"d$„Z#d%„Z$dAd'„Z%d(„Z&d)„Z'd*„Z(d=d+„Z)d,„Z*dBd/„Z+d0„Z,d1„Z-d2„Z.d3„Z/d4„Z0e0Z1d=d5„Z2dCd7„Z3dCd8„Z4dCd9„Z5d:„Z6d;„Z7eZ8dS)Dr zvAnimation part of the RawTurtle. Puts RawTurtle upon a TurtleScreen and provides tools for its animation. Nrlr‹r�có:—t|t¦«r||_nÔt|t¦«r5|tjvrtj |¦«||_nŠt|ttf¦«r\tjD]}|j |kr ||_n9Œt|¦«|_tj |j¦«ntd|z¦«‚|j}t  ||  ¦«¦«t  |¦«|j |¦«| ¦«|_t%||¦«|_d|_d|_dx|_|_||_d|_| ¦«|_|jg|_|jg|_g|_||_tA|¦«|_!| "¦«dS)Nzbad canvas argument %sF)#rÑÚ_Screenr”r r Úscreensržrr4rˆr5rär1rr5r�r«ÚdrawingLineItemrzr“Ú_polyÚ _creatingPolyÚ _fillitemÚ _fillpathr;Ú_hidden_from_screenÚcurrentLineItemríÚ currentLiner÷Ú stampItemsÚ_undobuffersizerDrërµ)rÌÚcanvasrlr‹r�r”s r¯r1zRawTurtle.__init__Ø sã€õ �f�gÑ &Ô &ð IØ ˆDŒKˆKÝ ˜¥ Ñ -Ô -ð IØ�YÔ.Ð.Ð.ÝÔ!×(Ò(¨Ñ0Ô0Ð0Ø ˆDŒKˆKÝ ˜¥µÐ 8Ñ 9Ô 9ð IÝ#Ô+ð 6ð 6�Ø”9 Ò&Ð&Ø"(�D”KØ�Eð'õ+¨6Ñ2Ô2�” ÝÔ!×(Ò(¨¬Ñ5Ô5Ð5øå%Ð&>ÀÑ&GÑHÔHÐ Hà”ˆÝ×Ò˜D &§+¢+¡-¤-Ñ0Ô0Ð0Ý � Š �dÑÔÐØŒ×Ò˜tÑ$Ô$Ð$Ø%×1Ò1Ñ3Ô3ˆÔÝ" 6¨5Ñ1Ô1ˆŒ ؈Œ Ø"ˆÔØ*.Ð.ˆŒ˜œØˆŒ Ø#(ˆÔ Ø%×1Ò1Ñ3Ô3ˆÔØ œNÐ+ˆÔØÔ*Ð+ˆŒ ؈ŒØ-ˆÔÝ! .Ñ1Ô1ˆŒØ � Š ‰ŒˆˆˆrÆcóæ—t |¦«t |¦«| ¦«| ¦«| ¦«dS)aäDelete the turtle's drawings and restore its default values. No argument. Delete the turtle's drawings from the screen, re-center the turtle and set variables to the default values. Example (for a Turtle instance named turtle): >>> turtle.position() (0.00,-22.00) >>> turtle.heading() 100.0 >>> turtle.reset() >>> turtle.position() (0.00,0.00) >>> turtle.heading() 0.0 N)rärar5r8Ú_clearrËrµrÙs r¯razRawTurtle.reset sZ€õ& ×Ò˜ÑÔÐÝ � Š �DÑÔÐØ � Š ‰ Œ ˆ Ø ×ÒÑÔÐØ � Š ‰ŒˆˆˆrÆcóP—|�|dkr d|_dSt|¦«|_dS)a¢Set or disable undobuffer. Argument: size -- an integer or None If size is an integer an empty undobuffer of given size is installed. Size gives the maximum number of turtle-actions that can be undone by the undo() function. If size is None, no undobuffer is present. Example (for a Turtle instance named turtle): >>> turtle.setundobuffer(42) Nr)rërD)rÌÚsizes r¯rizRawTurtle.setundobuffer s-€ð ˆ<˜4 1š9˜9Ø"ˆDŒOˆOˆOå% d™mœmˆDŒOˆOˆOrÆcóF—|j€dS|j ¦«S)z¾Return count of entries in the undobuffer. No argument. Example (for a Turtle instance named turtle): >>> while undobufferentries(): ... undo() Nr)rërQrÙs r¯ryzRawTurtle.undobufferentries, s%€ð Œ?Ð "Ø�1ØŒ×*Ò*Ñ,Ô,Ð,rÆcóv—dx|_|_|jD]}|j |¦«Œ|j ¦«|_g|_|jr|j  |j ¦«|jg|_|  ¦«|  |j ¦«dS)zDelete all of pen's drawingsN)rŠr‹r÷r”r³r«r�rŽr>ržrír8rir�r±s r¯r“zRawTurtle._clear9 s·€à*.Ð.ˆŒ˜œØ”Jð &ð &ˆDØ ŒK× Ò  Ñ %Ô %Ð %Ð %Ø#œ{×6Ò6Ñ8Ô8ˆÔØˆÔØ Œ=ð 4Ø Ô × #Ò # D¤NÑ 3Ô 3Ð 3ØÔ*Ð+ˆŒ Ø ×ÒÑÔÐØ ×Ò˜4Ô/Ñ0Ô0Ð0Ð0Ð0rÆcóV—| ¦«| ¦«dS)agDelete the turtle's drawings from the screen. Do not move turtle. No arguments. Delete the turtle's drawings from the screen. Do not move turtle. State and position of the turtle as well as drawings of other turtles are not affected. Examples (for a Turtle instance named turtle): >>> turtle.clear() N)r“rµrÙs r¯r6zRawTurtle.clearG s"€ð � Š ‰ Œ ˆ Ø � Š ‰ŒˆˆˆrÆcóò—|j ¦«|jjdkrdSt|j¦«dkr3|j |j|j|j|j¦«dSdSrÈ) r”rÈrŽrrŽr®r�r<r:rÙs r¯rÊzRawTurtle._update_dataV s…€Ø Œ ×!Ò!Ñ#Ô#Ð#Ø Œ;Ô %¨Ò *Ð *Ø ˆFÝ ˆtÔÑ Ô  Ò "Ð "Ø ŒK× !Ò ! $Ô"6¸Ô8HØ"&¤.°$´-ñ Aô Að Að Að Að #Ð "rÆcó´—|j}|jdkrdS|jdkrX| ¦«| ¦«| ¦«| |j¦«dS| ¦«|jdkrA| ¦«D]}| ¦«Œ| ¦«dSdS)z&Perform a Turtle-data update. rNrÉ) r”r�rÊrËrµr¹r�rŽr,)rÌr”rús r¯rµzRawTurtle._update^ s߀ð”ˆØ Œ?˜aÒ Ð Ø ˆFØ Œ_ Ò !Ð !Ø × Ò Ñ Ô Ð Ø × Ò Ñ Ô Ð Ø �NŠNÑ Ô Ð Ø �MŠM˜&Ô,Ñ -Ô -Ð -Ð -Ð -à × Ò Ñ Ô Ð ØÔ$¨Ò)Ð)ØŸšÑ)Ô)ð$ð$�AØ—M’M‘O”O�O�OØ—’Ñ Ô Ð Ð Ð ð*Ð)rÆcó8—|j ||¦«S)amTurns turtle animation on/off and set delay for update drawings. Optional arguments: n -- nonnegative integer delay -- nonnegative integer If n is given, only each n-th regular screen update is really performed. (Can be used to accelerate the drawing of complex graphics.) Second arguments sets delay value (see RawTurtle.delay()) Example (for a Turtle instance named turtle): >>> turtle.tracer(8, 25) >>> dist = 2 >>> for i in range(200): ... turtle.fd(dist) ... turtle.rt(90) ... dist += 2 )r”r+)rÌÚflagrs r¯r$zRawTurtle._tracerp s€ð&Œ{×!Ò! $¨Ñ.Ô.Ð.rÆcó6—|j |¦«SrÀ)r”r»rYs r¯r»zRawTurtle._color… s€ØŒ{×!Ò! $Ñ'Ô'Ð'rÆcó6—|j |¦«SrÀ)r”r³rYs r¯r³zRawTurtle._colorstrˆ s€ØŒ{×$Ò$ TÑ*Ô*Ð*rÆcóš—t|t¦«r|S |\}}}n4#ttf$r t dt|¦«z¦«‚wxYw|jjdkrd„|||fD¦«\}}}d|cxkrdkr"nnd|cxkrdkrnnd|cxkrdks!nt dt|¦«z¦«‚d|||fzS)z,Convert colortriples to hexstrings. r¦r‰có2—g|]}td|z¦«‘ŒSr¨r©r«s r¯r z!RawTurtle._cc..• r¬rÆrr­r®r¯)rÑrr°r£r5r”r‚)rÌrZr˜r±r²s r¯Ú_ccz RawTurtle._cc‹ s €õ �d�CÑ Ô ð ØˆKð M؉GˆAˆq�!�!øÝ�:Ð&ð Mð Mð MÝ%Ð&?Å#ÀdÁ)Ä)Ñ&KÑLÔLÐ Lð Møøøà Œ;Ô ! SÒ (Ð (Ø9Ð9°°1°a¨yÐ9Ñ9Ô9‰GˆAˆq�!Ø�a��’�˜3’���� Q¨! ] ]¢] ]¨s¢] ] ] ] ]¸¸a¸¸º¸À3º¸¸¸Ý%Ð&>ÅÀTÁÄÑ&JÑKÔKÐ KØ ! Q¨ Ñ*Ð*s ™  1Ac󿇗|jŠ| |j¦«|j}d|_d|_t |¦«}‰|_||_‰|_t ‰|jj¦«|_‰j |¦«‰j |jjj }|dkr‰  ¦«|j_ nn|dkr0‰  ‰j dj¦«|j_ n8|dkr2ˆfd„‰j |jjjD¦«|j_ ‰ ¦«|_| ¦«|S)aCreate and return a clone of the turtle. No argument. Create and return a clone of the turtle with same position, heading and turtle properties. Example (for a Turtle instance named mick): mick = Turtle() joe = mick.clone() Nr8rþr‰r:có8•—g|]}‰ ¦«‘ŒSrèr€r�s €r¯r z#RawTurtle.clone..¼ s7ø€ðLðLðL°t˜f×0Ò0Ñ2Ô2ðLðLðLrÆ)r”rer>r“rrzr}r�ržr~rr™r‚rr=r«r�rµ)rÌr“ÚqÚttyper”s @r¯r9zRawTurtle.cloneš sXø€ð”ˆØ � Š �d”mÑ$Ô$Ð$à”ˆØˆŒ ؈Œ å �T‰NŒNˆàˆŒ ؈Œ àˆŒÝ ¨¬ Ô(>Ñ?Ô?ˆŒàŒ×Ò˜qÑ!Ô!Ð!Ø”˜tœ{Ô5Ô6Ô<ˆØ �IÒ Ð Ø#×/Ò/Ñ1Ô1ˆAŒHŒNˆNØ �gÒ Ð Ø#×0Ò0°´ÀÔ1HÔ1NÑOÔOˆAŒHŒNˆNØ �jÒ Ð ðLðLðLðLØ$œn¨T¬[Ô-CÔDÔJðLñLôLˆAŒHŒNà"×.Ò.Ñ0Ô0ˆÔØ � Š ‰ Œ ˆ ؈rÆcóØ—|€ |jjS||j ¦«vrt d|z¦«‚|j |¦«| ¦«dS)aßSet turtle shape to shape with given name / return current shapename. Optional argument: name -- a string, which is a valid shapename Set turtle shape to shape with given name or, if name is not given, return name of current shape. Shape with name must exist in the TurtleScreen's shape dictionary. Initially there are the following polygon shapes: 'arrow', 'turtle', 'circle', 'square', 'triangle', 'classic'. To learn about how to deal with shapes see Screen-method register_shape. Example (for a Turtle instance named turtle): >>> turtle.shape() 'arrow' >>> turtle.shape("turtle") >>> turtle.shape() 'turtle' NzThere is no shape named %s)r“r}r”rr5r|rµ)rÌr¤s r¯rlzRawTurtle.shape sh€ð( ˆ<Ø”;Ô)Ð )Ø�t”{×,Ò,Ñ.Ô.Ð.Ð.Ý%Ð&BÀTÑ&IÑJÔJÐ JØ Œ ×Ò˜dÑ#Ô#Ð#Ø � Š ‰ŒˆˆˆrÆcó—||cxur|cxur€nn|j\}}|||jfS|dks|dkrtd¦«‚|� |€||f}n||f}n|�|jd|f}n|j}|€|j}| d||¬¦«dS)aOSet/return turtle's stretchfactors/outline. Set resizemode to "user". Optional arguments: stretch_wid : positive number stretch_len : positive number outline : positive number Return or set the pen's attributes x/y-stretchfactors and/or outline. Set resizemode to "user". If and only if resizemode is set to "user", the turtle will be displayed stretched according to its stretchfactors: stretch_wid is stretchfactor perpendicular to orientation stretch_len is stretchfactor in direction of turtles orientation. outline determines the width of the shapes's outline. Examples (for a Turtle instance named turtle): >>> turtle.resizemode("user") >>> turtle.shapesize(5, 5, 12) >>> turtle.shapesize(outline=8) Nrz(stretch_wid/stretch_len must not be zerorG)rbrcr—)r@rDr5rW)rÌÚ stretch_widÚ stretch_lenr—rcs r¯rmzRawTurtle.shapesizeÝ sï€ð* ˜+Ð 8Ð 8Ð 8Ð 8¨Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ø'+Ô':Ñ $ˆK˜Ø  ¨TÔ-?Ð?Ð ?Ø ˜!Ò Ð ˜{¨aÒ/Ð/Ý%Ð&PÑQÔQÐ QØ Ð "ØÐ"Ø +¨[Ð 8� � à +¨[Ð 8� � Ø Ð $Ø Ô/°Ô2°KÐ?ˆMˆMà Ô/ˆMØ ˆ?ØÔ(ˆGØ �Š˜FØ,°gð ñ ?ô ?ð ?ð ?ð ?rÆcóF—|€|jS| d|¬¦«dS)a¾Set or return the current shearfactor. Optional argument: shear -- number, tangent of the shear angle Shear the turtleshape according to the given shearfactor shear, which is the tangent of the shear angle. DO NOT change the turtle's heading (direction of movement). If shear is not given: return the current shearfactor, i. e. the tangent of the shear angle, by which lines parallel to the heading of the turtle are sheared. Examples (for a Turtle instance named turtle): >>> turtle.shape("circle") >>> turtle.shapesize(5,2) >>> turtle.shearfactor(0.5) >>> turtle.shearfactor() >>> 0.5 NrG)rbro)rArW)rÌÚshears r¯rozRawTurtle.shearfactor s.€ð& ˆ=ØÔ$Ð $Ø �Š˜F°ˆÑ6Ô6Ð6Ð6Ð6rÆcó^—tjddd¬¦«| |¦«dS)a{Rotate the turtleshape to point in the specified direction Argument: angle -- number Rotate the turtleshape to point in the direction specified by angle, regardless of its current tilt-angle. DO NOT change the turtle's heading (direction of movement). Deprecated since Python 3.1 Examples (for a Turtle instance named turtle): >>> turtle.shape("circle") >>> turtle.shapesize(5,2) >>> turtle.settiltangle(45) >>> turtle.stamp() >>> turtle.fd(50) >>> turtle.settiltangle(-45) >>> turtle.stamp() >>> turtle.fd(50) zturtle.RawTurtle.settiltangle()zn{name!r} is deprecated since Python 3.1 and scheduled for removal in Python {remove}. Use tiltangle() instead.)rŠé )r×N)ÚwarningsÚ _deprecatedrurs r¯rhzRawTurtle.settiltangle sD€õ* ÔÐ>ðXà$+ð -ñ -ô -ð -ð �Š�uÑÔÐÐÐrÆcó—|€4tj|j¦« |jz}||jz |jzS| |jz|jz}tj|¦«tjz}| d|¬¦«dS)aSet or return the current tilt-angle. Optional argument: angle -- number Rotate the turtleshape to point in the direction specified by angle, regardless of its current tilt-angle. DO NOT change the turtle's heading (direction of movement). If angle is not given: return the current tilt-angle, i. e. the angle between the orientation of the turtleshape and the heading of the turtle (its direction of movement). (Incorrectly marked as deprecated since Python 3.1, it is really settiltangle that is deprecated.) Examples (for a Turtle instance named turtle): >>> turtle.shape("circle") >>> turtle.shapesize(5, 2) >>> turtle.tiltangle() 0.0 >>> turtle.tiltangle(45) >>> turtle.tiltangle() 45.0 >>> turtle.stamp() >>> turtle.fd(50) >>> turtle.tiltangle(-45) >>> turtle.tiltangle() 315.0 >>> turtle.stamp() >>> turtle.fd(50) NrG)rbrt) rÜr;rBrêrôròr_rûrW)rÌrârts r¯ruzRawTurtle.tiltangle7 s„€ð> ˆ=Ý”L ¤Ñ,Ô,Ð,¨tÔ/@Ñ@ˆDؘ4Ô-Ñ-°Ô1AÑAÐ Aà�6˜DÔ.Ñ.°Ô1BÑBˆDÝ”< Ñ%Ô%­¬Ñ0ˆDØ �HŠH ¨TˆHÑ 2Ô 2Ð 2Ð 2Ð 2rÆcóZ—| || ¦«z¦«dS)aÌRotate the turtleshape by angle. Argument: angle - a number Rotate the turtleshape by angle from its current tilt-angle, but do NOT change the turtle's heading (direction of movement). Examples (for a Turtle instance named turtle): >>> turtle.shape("circle") >>> turtle.shapesize(5,2) >>> turtle.tilt(30) >>> turtle.fd(50) >>> turtle.tilt(30) >>> turtle.fd(50) N)rurs r¯rtzRawTurtle.tilt^ s+€ð" �Š�u˜tŸ~š~Ñ/Ô/Ñ/Ñ0Ô0Ð0Ð0Ð0rÆcó—||cxur |cxur|cxur€ nn|jS|j\}}}}|�|}|�|}|�|}|�|}||z||zz dkrtd¦«‚||||f|_tj| |¦«tjz} tj| ¦«tj| ¦«} } | |z| |zz | |z| |zz | |z| |zz| |z| |zzf\} } }}| |f|_| |z |_| |_ |  d¬¦«dS)aÒSet or return the current transformation matrix of the turtle shape. Optional arguments: t11, t12, t21, t22 -- numbers. If none of the matrix elements are given, return the transformation matrix. Otherwise set the given elements and transform the turtleshape according to the matrix consisting of first row t11, t12 and second row t21, 22. Modify stretchfactor, shearfactor and tiltangle according to the given matrix. Examples (for a Turtle instance named turtle): >>> turtle.shape("square") >>> turtle.shapesize(4,2) >>> turtle.shearfactor(-0.5) >>> turtle.shapetransform() (4.0, -1.0, -0.0, 2.0) Nrz0Bad shape transform matrix: must not be singularrGrH) rCr5rÜrrûráràr@rArBrW)rÌÚt11Út12Út21Út22Úm11Úm12Úm21Úm22ÚalfarorpÚa11Úa12Úa21Úa22s r¯rnzRawTurtle.shapetransformq sj€ð( �#Ð +Ð +Ð +Ð +˜Ð +Ð +Ð +Ð + Ð +Ð +Ð +Ð +Ð +Ð +Ð +Ð +ØÔ#Ð #Ø!Ô-шˆS�#�sØ ˆ? #˜CØ ˆ? #˜CØ ˆ? #˜CØ ˆ? #˜CØ �‰9�s˜S‘yÑ  AÒ %Ð %Ý%Ð&XÑYÔYÐ YØ  c¨3Ð/ˆÔÝŒz˜3˜$ Ñ$Ô$¥t¤xÑ/ˆÝ”˜$‘”¥¤¨$¡¤ˆBˆØ  ™f r¨#¡v™o¨r°#©v¸¸3¹©Ø  ™f r¨#¡v™o¨r°#©v¸¸3¹©ð@шˆS�#�sà! 3˜hˆÔØ ™GˆÔ؈Œ Ø �Š˜FˆÑ#Ô#Ð#Ð#Ð#rÆcóÖ‡‡‡‡‡—|jŠ|j\ŠŠ|j\ŠŠt‰‰‰jz‰jz ¦«}dt |¦«z |z\ŠŠˆˆˆˆˆfd„|D¦«S)zlComputes transformed polygon shapes from a shape according to current position and heading. r‰cóp•—g|]2\}}‰‰|z‰|zz‰jz z‰‰ |z‰|zz‰jz zf‘Œ3Srè)r‘r’)r rÄrÅÚe0Úe1Úp0Úp1r”s €€€€€r¯r z(RawTurtle._polytrafo..¢ sjø€ðOðOðOÙ?EÀÀ1ð�R˜‘T˜"˜Q™$‘Y ¤ Ñ-Ñ-¨r°B°3°q±5¸¸A¹±:¸v¼}Ñ2LÑ/LÐMðOðOðOrÆ)r”rírïrr’r‘r)rÌrAÚerÂrÃrÄrÅr”s @@@@@r¯Ú _polytrafozRawTurtle._polytrafo™ s¦øøøøø€ð”ˆØ”‰ˆˆBØ”‰ˆˆBÝ �"�b˜6œ=Ñ(¨6¬=Ñ8Ñ 9Ô 9ˆØ�˜A™œ‘, !Ñ#‰ˆˆBðOðOðOðOðOðOðOðOØIMðOñOôOð OrÆcóœ—|jj|jj}|jdkr$| |j|jdk¦«SdS)a@Return the current shape polygon as tuple of coordinate pairs. No argument. Examples (for a Turtle instance named turtle): >>> turtle.shape("square") >>> turtle.shapetransform(4, -1, 0, 2) >>> turtle.get_shapepoly() ((50, -20), (30, 20), (-50, 20), (-30, -20)) r8r:N)r”r~r“r}rÚ _getshapepolyr=)rÌrls r¯rHzRawTurtle.get_shapepoly¥ sL€ð” Ô# D¤KÔ$:Ô;ˆØ Œ;˜)Ò #Ð #Ø×%Ò% e¤k°5´;À*Ò3LÑMÔMÐ Mð $Ð #rÆFcóò‡‡‡‡—|jdks|r |j\ŠŠŠŠn<|jdkr$td|jdz ¦«}|dd|f\ŠŠŠŠn |jdkr|St ˆˆˆˆfd„|D¦«¦«S)z`Calculate transformed shape polygon according to resizemode and shapetransform. rGrFrÉg@rrŽc3óJ•K—|]\}}‰|z‰|zz‰|z‰|zzfV—ŒdSrÀrè)r rÄrÅr³r´rµr¶s €€€€r¯rºz*RawTurtle._getshapepoly..Á sDøèè€ÐJÐJ¹¸¸A�c˜!‘e˜c !™e‘m S¨¡U¨S°©U¡]Ð3ÐJÐJÐJÐJÐJÐJrÆ)r7rCÚmaxr:rÁ)rÌr8r:r*r³r´rµr¶s @@@@r¯rÉzRawTurtle._getshapepoly¶ s©øøøø€ð Ô ˜vÒ %Ð %¨Ð %Ø!%Ô!1Ñ ˆC��c˜3˜3Ø Ô  Ò 'Ð 'Ý�A�t”} SÑ(Ñ)Ô)ˆAØ!" A q¨! Ñ ˆC��c˜3˜3Ø Ô  Ò +Ð +؈NÝÐJÐJÐJÐJÐJÐJÐJÀ'ÐJÑJÔJÑJÔJÐJrÆc ó>—|j}|j|jj}|j}|jj}|j�r^|jdk�rR|jdk�rFd|_ |j }|dkr{|j dkrd}n|j dkr|j }n|j }| | |¦«¦«}|j|j}}| |||||d¬¦«d S|d kr| ||j|¦«d S|d kr‰t+||¦«D]z\} \} }}| | | d¦«¦«} | | | | |¦«| |¦«|j d¬¦«Œyd Sd S|j rd S|dkr| |d d d ¦«nV|d kr-| ||j|jdj ¦«n#|d kr|D]} | | d d d ¦«Œd|_ d S)zpManages the correct rendering of the turtle with respect to its shape, resizemode, stretch and tilt etc.rFr8rŽrÉrFT©ror—r{r¤rþr:N©rtrtrtr³r‰)r”r~r“r}rr‚r;rŽr�rŒr=r7r:rDrÇrÉr=r<r¦rríÚzipr¡) rÌr”rlr¥ÚtitemÚtshaper“ÚfcÚocr²rAs r¯rËzRawTurtle._drawturtleà sŸ€ð”ˆØ”˜tœ{Ô5Ô6ˆØ” ˆØ” Ô!ˆØ Œ;ñ ,˜6Ô0°AÒ5Ñ5¸&¼/ÈAÒ:MÑ:MØ',ˆDÔ $Ø”[ˆFؘ Ò!Ð!ØÔ# zÒ1Ð1°q°1°1ØÔ%¨Ò/Ð/°T´]°°ØÔ+�aØŸš¨×(:Ò(:¸6Ñ(BÔ(BÑCÔC�Øœ¨$¬.�B�Ø× Ò  ¨°BÀØ<=À4ð!ñIôIðIðIðIà˜'Ò!Ð!Ø×!Ò! %¨¬¸Ñ@Ô@Ð@Ð@Ð@ؘ*Ò$Ð$Ý,/°°vÑ,>Ô,>ð_ð_Ñ(�D™.˜4  RØŸ?š?¨4×+=Ò+=¸dÀDÑ+IÔ+IÑJÔJ�DØ×$Ò$ T¨4°d·h²h¸r±l´lØ-1¯XªX°b©\¬\ÀÔASÐY]ð%ñ_ô_ð_ð_ð%Ð$ð_ð_ð Ô'ð Ø�ؘ Ò!Ð!Ø× Ò  Ð(@À"ÀbÑIÔIÐIÐIؘ'Ò!Ð!Ø×!Ò! %¨¬Ø*0¬.¸Ô*AÔ*GñIôIðIðIà˜*Ò$Ð$Ø!ðMðM�DØ×$Ò$ TÐ+CÀRÈÑLÔLÐLÐLØ'+ˆDÔ $Ð $Ð $rÆc ó—|j}|j|jj}|j}|j}|dkr�| ¦«}|jdkrd}n|jdkr|j}n|j }|  |  |¦«¦«}|j |j }}| |||||d¬¦«�n|dkr2| d¦«}| ||j|¦«nÎ|d krÈg}|D]+} | ¦«} | | ¦«Œ,t'|¦«}t)||¦«D]x\} \} }}|  |  | d¦«¦«} | | | | |¦«| |¦«|j d¬¦«Œy|j |¦«|j d |f¦«|S) aÅStamp a copy of the turtleshape onto the canvas and return its id. No argument. Stamp a copy of the turtle shape onto the canvas at the current turtle position. Return a stamp_id for that stamp, which can be used to delete it by calling clearstamp(stamp_id). Example (for a Turtle instance named turtle): >>> turtle.color("blue") >>> turtle.stamp() 13 >>> turtle.fd(50) r8rŽrÉrFTrÎrþr³r:rs)r”r~r“r}rr=r™r7r:rDrÇrÉr=r<r¦rrríržrÁrÐr¡r�rërL) rÌr”rlr¥rÒÚstitemr“rÓrÔÚelementr²rAs r¯rszRawTurtle.stampë s*€ð”ˆØ”˜tœ{Ô5Ô6ˆØ” ˆØ”ˆØ �IÒ Ð Ø×'Ò'Ñ)Ô)ˆFØÔ :Ò-Ð-°1¨q¨qØÔ! VÒ+Ð+°´¨Q¨QØÔ'�!Ø—O’O D×$6Ò$6°vÑ$>Ô$>Ñ?Ô?ˆEØ”_ d¤n�ˆBØ × Ò ˜V U°¸RØ89¸tð ñ Eô Eð Eñ Eà �gÒ Ð Ø×(Ò(¨Ñ,Ô,ˆFØ × Ò ˜f d¤n°fÑ =Ô =Ð =Ð =Ø �jÒ Ð ØˆFØ!ð $ð $�Ø×)Ò)Ñ+Ô+�Ø— ’ ˜dÑ#Ô#Ð#Ð#ݘ6‘]”]ˆFÝ(+¨F°FÑ(;Ô(;ð [ð [Ñ$�‘n�t˜R Ø—’ t×'9Ò'9¸$ÀÑ'EÔ'EÑFÔF�Ø× Ò   t°$·(²(¸2±,´,Ø)-¯ª°"©¬¸TÔ=OÐUYð!ñ[ô[ð[ð[à Œ×Ò˜vÑ&Ô&Ð&Ø Œ×Ò˜g vÐ.Ñ/Ô/Ð/؈ rÆcó—||jvrit|t¦«r |D]}|j |¦«Œn|j |¦«|j |¦«d|f}|j}||jvrdS|j |¦«}|j |¦«||j kr|j dz |j z|_ |j  |j dz|j zdg¦«dS)z9does the work for clearstamp() and clearstamps() rsNrÉ) r�rÑrÁr”r³r×rërGÚindexrHrFÚinsert)rÌÚstampidÚsubitemr²ÚbufrÙs r¯Ú _clearstampzRawTurtle._clearstamp s€ð �d”oÐ %Ð %ݘ'¥5Ñ)Ô)ð -Ø&ð1ð1�GØ”K×'Ò'¨Ñ0Ô0Ð0Ð0ð1ð” ×#Ò# GÑ,Ô,Ð,Ø ŒO× "Ò " 7Ñ +Ô +Ð +ð˜Ð!ˆØŒoˆØ �s”zÐ !Ð !Ø ˆFØ” × Ò  Ñ&Ô&ˆØ Œ ×Ò˜$ÑÔÐØ �C”GÒ Ð Ø”w ‘{ c¤kÑ1ˆCŒGØ Œ ×Ò˜3œ7 1™9 c¤kÑ1°D°6Ñ:Ô:Ð:Ð:Ð:rÆcóX—| |¦«| ¦«dS)aDDelete stamp with given stampid Argument: stampid - an integer, must be return value of previous stamp() call. Example (for a Turtle instance named turtle): >>> turtle.color("blue") >>> astamp = turtle.stamp() >>> turtle.fd(50) >>> turtle.clearstamp(astamp) N)rÞrµ)rÌrÛs r¯r7zRawTurtle.clearstamp. s)€ð ×Ò˜Ñ!Ô!Ð!Ø � Š ‰ŒˆˆˆrÆcóЗ|€|jdd…}n%|dkr|jd|…}n|j|d…}|D]}| |¦«Œ| ¦«dS)aìDelete all or first/last n of turtle's stamps. Optional argument: n -- an integer If n is None, delete all of pen's stamps, else if n > 0 delete first n stamps else if n < 0 delete last n stamps. Example (for a Turtle instance named turtle): >>> for i in range(8): ... turtle.stamp(); turtle.fd(30) ... >>> turtle.clearstamps(2) >>> turtle.clearstamps(-2) >>> turtle.clearstamps() Nr)r�rÞrµ)rÌrÄÚtoDeleter²s r¯r8zRawTurtle.clearstamps= s}€ð$ ˆ9Ø” q q qÔ)ˆHˆHØ �!ŠVˆVØ” r¨ rÔ*ˆHˆHà” q r rÔ*ˆHØð #ð #ˆDØ × Ò ˜TÑ "Ô "Ð "Ð "Ø � Š ‰ŒˆˆˆrÆc óè—|j|j|jt|jt ¦«f}|j}d|j|||j|j dd…|  |j¦«|j dd…ff}|j r|j   |¦«|j}|j�r |jdkrþ||z }|d|jzdz|d|jzdzz}dt%|dzdd|jzz|jzz ¦«z}|d |z z} t'd|¦«D]d} | dkrd } nd } || | zz|_|jr/| |j||jf|j|j| ¦«| ¦«Œe|jr#| |jd d |j¬¦«|jr|j  |¦«t|jt ¦«r|j |¦«||_|jr|j |¦«t5|j ¦«dkr| ¦«| ¦«dS)z˜Move the pen to the point end, thereby drawing a line if pen is down. All other methods for turtle movement depend on this one. ÚgoNrÉrrr‚rŠçš™™™™™ñ?r‰TF©rtrtr³©ror{é*)r>r<r:rÑr‹ròr”rír�rŽrr÷rërLr?r�r‘r’r§rr®r‡rµržr‰rˆrre) rÌrÚgo_modesr”Ú undo_entryÚstartÚdiffÚdiffsqÚnhopsÚdeltarÄr¤s r¯rýzRawTurtle._gotoY sž€ð ”]Ø”^Ø”]Ý ¤µÑ5Ô5ð7ˆð”ˆØ˜DœN¨C°ØÔ+ØÔ& q q qÔ)Ø×'Ò'¨Ô(<Ñ=Ô=Ø”j   ”mð%ðˆ ð Œ?ð -Ø ŒO× Ò  Ñ ,Ô ,Ð ,Ø”ˆØ Œ;ñ M˜6œ?¨aÒ/Ð/ؘ‘IˆDؘ1”g˜fœmÑ+¨aÑ/°4¸´7¸6¼=Ñ3HÈ1Ñ2LÑLˆFØ•c˜6 3™;¨¨C°´Ñ,<Ñ)=¸d¼kÑ)IÑJÑKÔKÑKˆEؘC ™IÑ&ˆEݘ1˜e‘_”_ð ð �ؘ’6�6Ø�C�Cà�CØ!&¨°©Ñ!2�”Ø”=ðIØ×$Ò$ TÔ%9Ø&+¨T¬^Ð%<Ø%)¤^°T´]ÀCñIôIðIð— ’ ‘”��ØŒ}ð MØ× Ò  Ô!5Ð7GØ46¸d¼mð!ñMôMðMð Œ=ð )Ø Ô × #Ò # CÑ (Ô (Ð (Ý �d”n¥dÑ +Ô +ð 'Ø ŒN× !Ò ! #Ñ &Ô &Ð &àˆŒØ Ô ð #Ø ŒJ× Ò ˜cÑ "Ô "Ð "Ý ˆtÔÑ Ô  2Ò %Ð %à �MŠM‰OŒOˆOØ � Š ‰ŒˆˆˆrÆcóà‡‡—|\}}}}|\}}}} |\} } } Š|jŠt|j|z ¦«dkrtd¦«| |_| |_| ddgkrd} n|} ‰ | | | |¬¦«ˆˆfd„|jD¦«}|D]1}‰ |¦«|j  |¦«Œ2|}|j rð‰j dkrå||z }|d‰j zd z|d‰j zd zz}dt|dzd d |j zz|j zz ¦«z}|d |z z}td|¦«D]U}|dkrd }nd}|||zz|_|r%‰ |j||jf|||¦«| ¦«ŒV|r‰ |jdd|¬¦«||_|jrJt'|j¦«dkr|j ¦«|jgkrd|_d|_| rB|jgkrd|_td¦«n |j�|j ¦«| ¦«dS)z)Reverse a _goto. Used for undo() r‚z$undogoto: HALLO-DA-STIMMT-WAS-NICHT!rtr³ræcóN•—g|]!}|‰vr‰ |¦«dk¯|‘Œ"S)r¬)r)r r r÷r”s €€r¯r z'RawTurtle._undogoto..¡ sBø€ðDðDðD˜!¨a°u¨n¨nØ(.¯ ª °Q©¬¸6Ò(AÐ(AðØ(AÐ(AÐ(ArÆrÉrrrŠrär‰TFråNzUnwahrscheinlich in _undogoto!)r”rrír¤r�rŽr®r÷r³r×r?r�r‘r’r§rr‡rµr‰rrˆrNr‹)rÌÚentryÚoldÚnewrèÚcoodataÚdrawingÚpcÚpsrCÚcLIÚcLrÚusepcÚtodeleter rêrërìrírîrÄr¤r÷r”s @@r¯Ú _undogotozRawTurtle._undogotoŽ søø€ð',Ñ#ˆˆS�(˜GØ#+Ñ ˆ��R˜Ø$шˆR��UØ”ˆÝ ˆtŒ~ Ñ#Ñ $Ô $ sÒ *Ð *Ý Ð9Ñ :Ô :Ð :à"ˆÔ؈Ôà �&˜&Ð!Ò !Ð !؈EˆEàˆEØ×Ò˜˜b u°BÐÑ7Ô7Ð7ðDðDðDðDðD˜tœzðDñDôDˆàð !ð !ˆAØ �NŠN˜1Ñ Ô Ð Ø ŒJ× Ò ˜aÑ Ô Ð Ð àˆØ Œ;ð B˜6œ?¨aÒ/Ð/ؘ‘9ˆDؘ1”g˜fœmÑ+¨aÑ/°4¸´7¸6¼=Ñ3HÈ1Ñ2LÑLˆFØ•c˜6 3™;¨¨C°´Ñ,<Ñ)=¸d¼kÑ)IÑJÑKÔKÑKˆEؘC ™IÑ&ˆEݘ1˜e‘_”_ð ð �ؘ’6�6Ø�C�Cà�CØ!$ u¨q¡y¡�”Øð2Ø×$Ò$ TÔ%9Ø&+¨T¬^Ð%<Ø%'¨¨Sñ2ô2ð2ð— ’ ‘”��Øð BØ× Ò  Ô!5Ð7GØ46¸bð!ñBôBðBðˆŒð Ô ð "Ý�4”:‰Œ Ò"Ð"Ø” —’Ñ Ô Ð ØŒz˜RÒÐØ%*�Ô"Ø!�” Ø ð %ØŒ~ Ò#Ð#Ø!%�”ÝÐ6Ñ7Ô7Ð7Ð7Ø”Ð+Ø”×"Ò"Ñ$Ô$Ð$Ø � Š ‰ŒˆˆˆrÆcó—|jr"|j d||jf¦«||jz}|j |¦«}|jj}|dkr„|jdkryd|jz}dtt|¦«|z ¦«z}d|z|z }t|¦«D]5}|j |¦«|_|  ¦«Œ6||_|  ¦«dS)z&Turns pen clockwise by angle. ÚrotrÉrg@r‰N) rërLrôrïrær”r�r?r§rrrµ)rÌrâÚ neworientrÌÚanglevelr'rîrs r¯rzRawTurtle._rotateÏ s÷€ð Œ?ð EØ ŒO× Ò  %¨°Ô0BÐ!CÑ DÔ DÐ DØ �Ô#Ñ#ˆØ”L×'Ò'¨Ñ.Ô.ˆ Ø”+Ô&ˆØ �aŠ<ˆ<˜DœK¨!šO˜OؘTœ[Ñ(ˆHØ��C ™JœJ xÑ/Ñ0Ô0Ñ0ˆEؘ‘I˜e‘OˆEݘ5‘\”\ð ð �Ø#œ|×2Ò2°5Ñ9Ô9�” Ø— ’ ‘”��Ø ˆŒ Ø � Š ‰ŒˆˆˆrÆTcó†—t|j¦«dkro|j |j|j|j|j¦«|j ¦«|_|j  |j¦«n!|j |jd¬¦«g|_|r|j g|_dSdS)z¶Closes current line item and starts a new one. Remark: if current line became too long, animation performance (via _drawline) slowed down considerably. rÉT)r¤N) rrŽr”r®r�r<r:r«r÷ržrírrs r¯rezRawTurtle._newLineá sÇ€õ ˆtÔÑ Ô  1Ò $Ð $Ø ŒK× !Ò ! $Ô"6¸Ô8HØ&*¤n°d´mñ Eô Eð Eà#'¤;×#:Ò#:Ñ#<Ô#<ˆDÔ Ø ŒJ× Ò ˜dÔ2Ñ 3Ô 3Ð 3Ð 3à ŒK× !Ò ! $Ô"6¸DÐ !Ñ AÔ AÐ AØˆÔØ ð 0Ø $¤Ð/ˆDÔ Ð Ð ð 0ð 0rÆcó6—t|jt¦«S)aReturn fillstate (True if filling, False else). No argument. Example (for a Turtle instance named turtle): >>> turtle.begin_fill() >>> if turtle.filling(): ... turtle.pensize(5) ... else: ... turtle.pensize(3) )rÑr‹ròrÙs r¯rCzRawTurtle.fillingñ s€õ˜$œ.­$Ñ/Ô/Ð/rÆcób—| ¦«s=|j ¦«|_|j |j¦«|jg|_| ¦«|j r!|j   d|jf¦«|  ¦«dS)a Called just before drawing a shape to be filled. No argument. Example (for a Turtle instance named turtle): >>> turtle.color("black", "red") >>> turtle.begin_fill() >>> turtle.circle(60) >>> turtle.end_fill() Ú beginfillN) rCr”r™rŠr÷ržrír‹rerërLrµrÙs r¯r2zRawTurtle.begin_fillÿ s“€ð�|Š|‰~Œ~ð .Ø!œ[×4Ò4Ñ6Ô6ˆDŒNØ ŒJ× Ò ˜dœnÑ -Ô -Ð -Øœ.Ð)ˆŒØ � Š ‰ŒˆØ Œ?ð @Ø ŒO× Ò  +¨t¬~Ð!>Ñ ?Ô ?Ð ?Ø � Š ‰ŒˆˆˆrÆcóN—| ¦«r�t|j¦«dkrT|j |j|j|j¬¦«|jr!|j d|jf¦«dx|_|_|  ¦«dSdS)a Fill the shape drawn after the call begin_fill(). No argument. Example (for a Turtle instance named turtle): >>> turtle.color("black", "red") >>> turtle.begin_fill() >>> turtle.circle(60) >>> turtle.end_fill() rr›ÚdofillN) rCrr‹r”r¦rŠr=rërLrµrÙs r¯r?zRawTurtle.end_fill s¦€ð �<Š<‰>Œ>ð Ý�4”>Ñ"Ô" QÒ&Ð&Ø” ×%Ò% d¤n°d´nØ+/¬?ð&ñ<ô<ð<à”?ðEØ”O×(Ò(¨(°D´NÐ)CÑDÔDÐDØ.2Ð 2ˆDŒN˜Tœ^Ø �LŠL‰NŒNˆNˆNˆNð ð rÆcóZ—|svt|ttf¦«r3| |¦«}|jt |jd¦«z}n[|j}|s|jt |jd¦«z}n4|€|jt |jd¦«z}| |¦«}t|jd¦«rb|j  |j ||¦«}|j   |¦«|j r|j  d|f¦«dSdS| ¦«}|j r'|j  dg¦«d|j _ | ¦«dkr| ¦«| ¦«| |¦«| |¦«| d¦«| |¦«n#| |¦«wxYw|j rd |j _dSdS) aÑDraw a dot with diameter size, using color. Optional arguments: size -- an integer >= 1 (if given) color -- a colorstring or a numeric color tuple Draw a circular dot with diameter size, using color. If size is not given, the maximum of pensize+4 and 2*pensize is used. Example (for a Turtle instance named turtle): >>> turtle.dot() >>> turtle.fd(50); turtle.dot(20, "blue"); turtle.fd(50) riNÚ_dotr=r!TrFrF)rÑrrÁr³r:rÌr<Úhasattrr”rrír÷ržrërLrWrIrbrNrYrZrXrD)rÌr•r:r²rWs r¯r=z RawTurtle.dot( s €ðð *ݘ$¥¥e  Ñ-Ô-ð AØŸš tÑ,Ô,�Ø”}¥s¨4¬=¸!Ñ'<Ô'<Ñ<��àœ�ØðAØœ=­3¨t¬}¸aÑ+@Ô+@Ñ@�Døàˆ|Ø”}¥s¨4¬=¸!Ñ'<Ô'<Ñ<�Ø—N’N 5Ñ)Ô)ˆEÝ �4”; Ñ 'Ô 'ð 1Ø”;×#Ò# D¤N°D¸%Ñ@Ô@ˆDØ ŒJ× Ò ˜dÑ #Ô #Ð #ØŒð 4Ø”×$Ò$ e¨T ]Ñ3Ô3Ð3Ð3Ð3ð 4ð 4ð—(’(‘*”*ˆCØŒð 0Ø”×$Ò$ e WÑ-Ô-Ð-Ø+/�”Ô(ð Ø—?’?Ñ$Ô$¨Ò.Ð.Ø—G’G‘I”I�IØ— ’ ‘”�Ø— ’ ˜TÑ"Ô"Ð"Ø— ’ ˜eÑ$Ô$Ð$Ø— ’ ˜Q‘”�à—’˜‘ ” � � ø�—’˜‘ ” � � øøøØŒð 1Ø+0�”Ô(Ð(Ð(ð 1ð 1s Å'A?G<Ç<Hcóþ—|j |j||||j¦«\}}| ¦«|j |¦«|jr|j d|f¦«|S)z)Performs the writing for write() Úwri) r”rÐrír<rµr÷ržrërL)rÌrÊrËrÈr²rs r¯rÐzRawTurtle._writeX s|€ð”K×&Ò& t¤~°s¸EÀ4Ø:>¼.ñJôJ‰ ˆˆcà � Š ‰ŒˆØ Œ ×Ò˜$ÑÔÐØ Œ?ð 0Ø ŒO× Ò  %¨ Ñ /Ô /Ð /؈ rÆrQ©ÚArialrbrScóV—|jr'|j dg¦«d|j_| t |¦«| ¦«|¦«}|r-| ¦«\}}| ||¦«|jrd|j_dSdS)a÷Write text at the current turtle position. Arguments: arg -- info, which is to be written to the TurtleScreen move (optional) -- True/False align (optional) -- one of the strings "left", "center" or right" font (optional) -- a triple (fontname, fontsize, fonttype) Write text - the string representation of arg - at the current turtle position according to align ("left", "center" or right") and with the given font. If move is True, the pen is moved to the bottom-right corner of the text. By default, move is False. Example (for a Turtle instance named turtle): >>> turtle.write('Home = ', True, align="center") >>> turtle.write((0,0), True) r!TFN)rërLrIrÐrr;r\rf)rÌÚargÚmoverËrÈrrÄrÅs r¯r|zRawTurtle.writec s¤€ð& Œ?ð ,Ø ŒO× Ò  % Ñ )Ô )Ð )Ø'+ˆDŒOÔ $Ø�kŠk�#˜c™(œ( E§K¢K¡M¤M°4Ñ8Ô8ˆØ ð Ø—8’8‘:”:‰DˆAˆqØ �KŠK˜˜QÑ Ô Ð Ø Œ?ð -Ø',ˆDŒOÔ $Ð $Ð $ð -ð -rÆcó.—|jg|_d|_dS)aStart recording the vertices of a polygon. No argument. Start recording the vertices of a polygon. Current turtle position is first point of polygon. Example (for a Turtle instance named turtle): >>> turtle.begin_poly() TN)rírˆr‰rÙs r¯r3zRawTurtle.begin_poly€ s€ð”nÐ%ˆŒ Ø!ˆÔÐÐrÆcó—d|_dS)a7Stop recording the vertices of a polygon. No argument. Stop recording the vertices of a polygon. Current turtle position is last point of polygon. This will be connected with the first point. Example (for a Turtle instance named turtle): >>> turtle.end_poly() FN)r‰rÙs r¯r@zRawTurtle.end_polyŽ s€ð#ˆÔÐÐrÆcó<—|j�t|j¦«SdS)zÔReturn the lastly recorded polygon. No argument. Example (for a Turtle instance named turtle): >>> p = turtle.get_poly() >>> turtle.register_shape("myFavouriteShape", p) N)rˆrÁrÙs r¯rEzRawTurtle.get_poly› s$€ð Œ:Ð !ݘœÑ$Ô$Ð $ð "Ð !rÆcó—|jS)a˜Return the TurtleScreen object, the turtle is drawing on. No argument. Return the TurtleScreen object, the turtle is drawing on. So TurtleScreen-methods can be called for that object. Example (for a Turtle instance named turtle): >>> ts = turtle.getscreen() >>> ts >>> ts.bgcolor("pink") )r”rÙs r¯rGzRawTurtle.getscreen¨ s €ðŒ{ÐrÆcó—|S)aUReturn the Turtleobject itself. No argument. Only reasonable use: as a function to return the 'anonymous turtle': Example: >>> pet = getturtle() >>> pet.fd(50) >>> pet >>> turtles() [] rèrÙs r¯rIzRawTurtle.getturtle¸ s €ðˆ rÆcó6—|j |¦«S)zDSet delay value which determines speed of turtle animation. )r”rr¸s r¯r¹zRawTurtle._delayÐ s€ðŒ{× Ò  Ñ'Ô'Ð'rÆrÉcó|—|j |jj|||¦«| ¦«dS)a¹Bind fun to mouse-click event on this turtle on canvas. Arguments: fun -- a function with two arguments, to which will be assigned the coordinates of the clicked point on the canvas. btn -- number of the mouse-button defaults to 1 (left mouse button). add -- True or False. If True, new binding will be added, otherwise it will replace a former binding. Example for the anonymous turtle, i. e. the procedural way: >>> def turn(x, y): ... left(360) ... >>> onclick(turn) # Now clicking into the turtle will turn it. >>> onclick(None) # event-binding will be removed N)r”rár“r‚rµrÕs r¯rSzRawTurtle.onclickÕ s6€ð$ Œ ×Ò˜Tœ[Ô.°°S¸#Ñ>Ô>Ð>Ø � Š ‰ŒˆˆˆrÆcó|—|j |jj|||¦«| ¦«dS)aÿBind fun to mouse-button-release event on this turtle on canvas. Arguments: fun -- a function with two arguments, to which will be assigned the coordinates of the clicked point on the canvas. btn -- number of the mouse-button defaults to 1 (left mouse button). Example (for a MyTurtle instance named joe): >>> class MyTurtle(Turtle): ... def glow(self,x,y): ... self.fillcolor("red") ... def unglow(self,x,y): ... self.fillcolor("") ... >>> joe = MyTurtle() >>> joe.onclick(joe.glow) >>> joe.onrelease(joe.unglow) Clicking on joe turns fillcolor red, unclicking turns it to transparent. N)r”rär“r‚rµrÕs r¯rUzRawTurtle.onreleaseê s6€ð, Œ ×Ò˜tœ{Ô0°#°s¸CÑ@Ô@Ð@Ø � Š ‰ŒˆˆˆrÆcóT—|j |jj|||¦«dS)a’Bind fun to mouse-move event on this turtle on canvas. Arguments: fun -- a function with two arguments, to which will be assigned the coordinates of the clicked point on the canvas. btn -- number of the mouse-button defaults to 1 (left mouse button). Every sequence of mouse-move-events on a turtle is preceded by a mouse-click event on that turtle. Example (for a Turtle instance named turtle): >>> turtle.ondrag(turtle.goto) Subsequently clicking and dragging a Turtle will move it across the screen thereby producing handdrawings (if pen is down). N)r”rçr“r‚rÕs r¯rTzRawTurtle.ondrags+€ð$ Œ ×Ò˜DœKÔ-¨s°C¸Ñ=Ô=Ð=Ð=Ð=rÆcóH—|j€dS|dkrA|\}}| | |z|jz ¦«|j ¦«}dS|dkr|d}| |¦«dS|dkr| |¦«dS|dvr>|d}|j |¦«|j  |¦«dS|dkr(|d}|j  |dd d ¬ ¦«dS|d krW|d}dx|_ |_ ||jvr6|j |¦«|j  |¦«dSdS|d krØ')°2ð "ñ 7ô 7ð 7ð 7ð 7à �{Ò "Ð "ؘ”7ˆDØ.2Ð 2ˆDŒN˜Tœ^Ø�t”zÐ!Ð!Ø” ×#Ò# DÑ)Ô)Ð)Ø” ×!Ò! $Ñ'Ô'Ð'Ð'Ð'ð"Ð!ð�uŠ_ˆ_Ý �HŠH�T˜4 œ7Ñ #Ô #Ð #Ø ŒO× Ò Ñ !Ô !Ð !Ð !Ð !ðˆ_rÆcó&—|j€dS|j ¦«}|d}|dd…}|dkr@|r<| ¦«}| |d|dd…¦«|°:dSdS| ||¦«dS)a±undo (repeatedly) the last turtle action. No argument. undo (repeatedly) the last turtle action. Number of available undo actions is determined by the size of the undobuffer. Example (for a Turtle instance named turtle): >>> for i in range(4): ... turtle.fd(50); turtle.lt(80) ... >>> for i in range(8): ... turtle.undo() ... NrrÉr!)rërNr)rÌr²rr?s r¯rxzRawTurtle.undo8s²€ð" Œ?Ð "Ø ˆFØŒ×"Ò"Ñ$Ô$ˆØ�a”ˆØ�A�B�BŒxˆØ �UŠ?ˆ?Øð .Ø—x’x‘z”z�Ø— ’ ˜4 œ7 D¨¨¨¤HÑ-Ô-Ð-ðð .ð .ð .ð .ð .ð �JŠJ�v˜tÑ $Ô $Ð $Ð $Ð $rÆrárÀrg)NNNN)Frx)FrQr r1)9rìrírîrïr†r¶r1rariryr“r6rÊrµr$r»r³r¡r9rlrmrorhrurtrnrÇrHrÉrËrsrÞr7r8rýrürrerCr2r?r=rÐr|r3r@rErGrIrFr¹rSrUrTrrxrwrèrÆr¯r r Ñ sŽ€€€€€ððð€Gà"ؘG”}Ø $Ð%5Ô 6ؘiœð&ð&ð&ð&ðPððð2,ð,ð,ð& -ð -ð -ð 1ð 1ð 1ð ð ð ðAðAðAð!ð!ð!ð$/ð/ð/ð/ð*(ð(ð(ð+ð+ð+ð +ð +ð +ð&ð&ð&ðPðððð6&?ð&?ð&?ð&?ðP7ð7ð7ð7ð.ððð6%3ð%3ð%3ð%3ðN1ð1ð1ð&%$ð%$ð%$ð%$ðP Oð Oð OðNðNðNð" Kð Kð Kð Kð$,ð$,ð$,ðP+ð+ð+ðZ;ð;ð;ð, ð ð ððððð83ð3ð3ðj?ð?ð?ðBððð$0ð0ð0ð0ð 0ð 0ð 0ðððð*ððð(.1ð.1ð.1ð.1ð` ð ð ð-ð-ð-ð-ð: "ð "ð "ð #ð #ð #ð %ð %ð %ðððð ððð"€Fð(ð(ð(ð(ð ðððð*ðððð2>ð>ð>ð>ð*"ð"ð"ð@%ð%ð%ð:€J€J€JrÆr cób—tj€t¦«t_tjS)z‡Return the singleton screen object. If none exists at the moment, create a new one and return it, else return the existing one.)r Ú_screenr…rèrÆr¯r r [s€õ„~ÐÝ ™œ�ŒÝ Œ>ÐrÆcó„—eZdZdZdZedZd„Zededededfd„Zd „Z d „Z d „Z d „Z dS) r…Nr*có”—tj€bt¦«xt_|_|j tj¦«|j |j¦«tj€Ítd}td}td}td}td}td}|j  ||||¦«|j  ¦«t_t  |tj¦«|  ||||¦«dSdS)Nr{rƒr„r…r†r‡)r…Ú_rootrir*Ú_titler}Ú_destroyr6r¶rqrsr r1r')rÌr{rƒr„r…r†r‡s r¯r1z_Screen.__init__isÿ€õ Œ=Ð Ý).©¬Ð 0�GŒM˜DœJØ ŒJ× Ò �Wœ^Ñ ,Ô ,Ð ,Ø ŒJ× Ò  ¤Ñ /Ô /Ð /Ý Œ?Ð "ݘ”MˆEݘ(”^ˆFݘ[Ô)ˆIݘlÔ+ˆJݘ[Ô)ˆIݘ[Ô)ˆIØ ŒJ× "Ò " 5¨&°)¸ZÑ HÔ HÐ HØ"œj×3Ò3Ñ5Ô5�GŒOÝ × !Ò ! $­¬Ñ 8Ô 8Ð 8Ø �JŠJ�u˜f i°Ñ ;Ô ;Ð ;Ð ;Ð ;ð #Ð "rÆr{rƒr†r‡cóÊ—t|jd¦«sdS|j ¦«}|j ¦«}t |t ¦«rd|cxkrdkrnn||z}|€||z dz }t |t ¦«rd|cxkrdkrnn||z}|€||z dz }|j ||||¦«| ¦«dS)a  Set the size and position of the main window. Arguments: width: as integer a size in pixels, as float a fraction of the screen. Default is 50% of screen. height: as integer the height in pixels, as float a fraction of the screen. Default is 75% of screen. startx: if positive, starting position in pixels from the left edge of the screen, if negative from the right edge Default, startx=None is to center window horizontally. starty: if positive, starting position in pixels from the top edge of the screen, if negative from the bottom edge Default, starty=None is to center window vertically. Examples (for a Screen instance named screen): >>> screen.setup (width=200, height=200, startx=0, starty=0) sets window to 200x200 pixels, in upper left of screen >>> screen.setup(width=.75, height=0.5, startx=None, starty=None) sets window to 75% of screen by 50% of screen and centers rxNrrÉr)r r$r€rƒrÑr¦rxr-)rÌr{rƒrvrwrÃÚshs r¯r'z _Screen.setups€õ2�t”z >Ñ2Ô2ð Ø ˆFØ ŒZ× !Ò !Ñ #Ô #ˆØ ŒZ× "Ò "Ñ $Ô $ˆÝ �e�UÑ #Ô #𠨨U¨¨ª¨°aª¨¨¨¨Ø�u‘HˆEØ ˆ>ؘ5‘j AÑ%ˆFÝ �f�eÑ $Ô $𠨨fÐ)9Ð)9Ò)9Ð)9¸Ò)9Ð)9Ð)9Ð)9Ð)9ؘ‘YˆFØ ˆ>ؘ6‘k QÑ&ˆFØ Œ ×Ò  v¨v°vÑ>Ô>Ð>Ø � Š ‰ Œ ˆ ˆ ˆ rÆcót—tj�tj |¦«|t_dS)aqSet title of turtle-window Argument: titlestring -- a string, to appear in the titlebar of the turtle graphics window. This is a method of Screen-class. Not available for TurtleScreen- objects. Example (for a Screen instance named screen): >>> screen.title("Welcome to the turtle-zoo!") N)r…r$r*r%)rÌÚ titlestrings r¯r*z _Screen.title§s-€õ Œ=Ð $Ý ŒM× Ò   Ñ ,Ô ,Ð ,Ø$�ŒˆˆrÆcóЗ|j}|tjur0dt_dt_dt_dt_dt _| ¦«dS)NF) r$r…r r�r!r6r rÇr|)rÌÚroots r¯r&z_Screen._destroy¸sK€ØŒzˆØ •7”=Ð Ð Ø�FŒKØ!�FŒNØ �GŒMØ"�GŒOØ %� ÔØ � Š ‰ŒˆˆˆrÆcó.—| ¦«dS)z~Shut the turtlegraphics window. Example (for a TurtleScreen instance named screen): >>> screen.bye() N)r&rÙs r¯rz _Screen.byeÂs€ð � Š ‰ŒˆˆˆrÆc󸇗ˆfd„}‰ |¦«tdrdS t¦«dS#t$rt d¦«YdSwxYw)alGo into mainloop until the mouse is clicked. No arguments. Bind bye() method to mouseclick on TurtleScreen. If "using_IDLE" - value in configuration dictionary is False (default value), enter mainloop. If IDLE with -n switch (no subprocess) is used, this value should be set to True in turtle.cfg. In this case IDLE's mainloop is active also for the client script. This is a method of the Screen-class and not available for TurtleScreen instances. Example (for a Screen instance named screen): >>> screen.exitonclick() có0•—‰ ¦«dS)z&Screen.bye() with two dummy-parametersN)r)rÄrÅrÌs €r¯ÚexitGracefullyz+_Screen.exitonclick..exitGracefullyÝsø€à �HŠH‰JŒJˆJˆJˆJrÆr–Nr)rSr¶rÚAttributeErrorÚexit)rÌr0s` r¯rz_Screen.exitonclickÊs€ø€ð& ð ð ð ð ð � Š �^Ñ$Ô$Ð$Ý � Ô ð Ø ˆFð Ý ‰JŒJˆJˆJˆJøÝð ð ð Ý �‰GŒGˆGˆGˆGˆGð øøøs¬<¼AÁA) rìrírîr$r6r¶r%r1r'r*r&rrrèrÆr¯r…r…cs¥€€€€€à €EØ€GØ �'Œ]€Fð<ð<ð<ð,˜wœ-°°X´Ø˜+Ô&¨t°KÔ/@ð&ð&ð&ð&ðP%ð%ð%ð"ððððððððððrÆr…cóL—eZdZdZdZdZedededfd„ZdS)r zÀRawTurtle auto-creating (scrolled) canvas. When a Turtle object is created or a function derived from some Turtle method is called a TurtleScreen object is automatically created. Nrlr‹r�có —tj€t¦«t_t |tj|||¬¦«dS)N)rlr‹r�)r r!r r r1)rÌrlr‹r�s r¯r1zTurtle.__init__ñsM€õ Œ>Ð !Ý#™XœX�FŒNÝ×Ò˜4¥¤Ø!&Ø*8Ø#*ð ñ ,ô ,ð ,ð ,ð ,rÆ)rìrírîrïr�r!r¶r1rèrÆr¯r r èsW€€€€€ððð €DØ€Gð˜G”}Ø $Ð%5Ô 6ؘiœð ,ð ,ð ,ð ,ð ,ð ,rÆr Úturtle_docstringdictcóÞ—i}tD]}d|z}t|¦«j||<ŒtD]}d|z}t|¦«j||<Œt d|zd¦«5}t d„|D¦«¦«}| d¦«|dd…D]E}| d t|¦«z¦«| d ||z¦«ŒF|d}| d t|¦«z¦«| d ||z¦«| d ¦«| ¦«ddd¦«dS#1swxYwYdS) a²Create and write docstring-dictionary to file. Optional argument: filename -- a string, used as filename default value is turtle_docstringdict Has to be called explicitly, (not used by the turtle-graphics classes) The docstring dictionary will be written to the Python script .py It is intended to serve as a template for translation of the docstrings into different languages. z_Screen.zTurtle.z%s.pyr“c3ó^K—|](}| d¦«dtv¯$|V—Œ)dS)ržrÉN)rÚ _alias_listr«s r¯rºz&write_docstringdict..sFèè€ð=ð=˜AØŸš ™œ aœµ Ð;Ð;ðØ;Ð;Ð;Ð;ð=ð=rÆzdocsdict = { Nrz%s : z """%s """, z """%s """ z} ) Ú_tg_screen_functionsr¥rïÚ_tg_turtle_functionsrŸrÓr|ÚreprÚclose)r¨ÚdocsdictÚ methodnamer­r©rÿs r¯rrþsÇ€ð€Hå*ð*ð*ˆ ؘÑ#ˆÝ˜S™ œ Ô)ˆ�‰ ˆ Ý*ð*ð*ˆ ؘ Ñ"ˆÝ˜S™ œ Ô)ˆ�‰ ˆ å ˆg˜Ñ  Ñ %Ô %ð ¨Ýð=ð= ð=ñ=ô=ñ=ô=ˆà �ŠÐ"Ñ#Ô#Ð#ؘ˜˜”9ð ?ð ?ˆCØ �GŠG�H�t C™yœyÑ(Ñ )Ô )Ð )Ø �GŠGÐ-°¸´ Ñ=Ñ >Ô >Ð >Ð >Ø�2ŒhˆØ �Š��4 ™9œ9Ñ$Ñ%Ô%Ð%Ø �ŠÐ(¨8°C¬=Ñ8Ñ9Ô9Ð9Ø �Š�‰ŒˆØ �Љ Œ ˆ ð ð ð ñ ô ð ð ð ð ð ð ð øøøð ð ð ð ð ð sÁ"C3E"Å"E&Å)E&cóè—dd| ¦«iz}t|¦«}|j}|D]?} ||t|¦«_Œ#t $rt d|z¦«YŒ.Ms€Ð7Ð7Ð7 U U˜˜Ð Ð7Ð7Ð7rÆcó—g|] \}}||z‘Œ Srèrè)r rÚdflts r¯r z"getmethparlist..Os €Ð BÐ BÐ B™Y˜S $ˆc�D‰jÐ BÐ BÐ BrÆÚ*z**z, z(%s))ÚinspectÚgetargsÚ__code__Ú __defaults__rrÐržr) ÚobÚdefTextÚcallTextrZÚvarargsÚvarkwÚitems2ÚrealArgsÚdefaultsÚitems1s r¯ÚgetmethparlistrW=sE€ðЀGˆhõ#œ?¨2¬;Ñ7Ô7Ñ€Dˆ'�5Ø �!�"�"ŒX€FØ�A�B�BŒx€HØŒÐ$ "€HØ7Ð7¨hÐ7Ñ7Ô7€H؈t•s˜8‘}”}¥S¨¡]¤]Ñ2Ñ3°hÑ>€HØ BÐ B­#¨h¸Ñ*AÔ*AÐ BÑ BÔ B€FØÐØ� Š �c˜G‘mÑ$Ô$Ð$Ø� Š �c˜G‘mÑ$Ô$Ð$Ø ÐØ� Š �d˜U‘lÑ#Ô#Ð#Ø� Š �d˜U‘lÑ#Ô#Ð#Ø�iŠi˜ÑÔ€GØ�wÑ€GØ�yŠy˜Ñ Ô €HØ˜Ñ €HØ �HÐ ÐrÆcó¾—ddl}|€dStd}| d|zd¦«}| d|z¦«}| d|¦«}|S)z>>>>>)ÚobjÚinitr¤Ú paramslistÚargslist)ÚgetattrrWr¤Ú __func_bodyÚformatr Úglobalsrï) Ú functionsrÃrkrlÚ docreviser>rÚpl1Úpl2Údefstrs r¯Ú_make_global_funcsrxˆs¸€Øð Bð Bˆ ݘ˜jÑ)Ô)ˆÝ! &Ñ)Ô)‰ˆˆSØ �"Š9ˆ9Ý �(˜C Ñ %Ô %Ð %Ø Ý×#Ò#¨°$¸ZØ/2¸Sð$ñBôBˆå ˆV•W‘Y”YÑÔÐØ(1¨ °&´.Ñ(AÔ(A�‰ Œ �*ÔÔ%Ð%ð Bð BrÆzTurtle._screenzScreen()z Turtle._penzTurtle()Ú__main__có^—t¦«rt¦«dSt¦«dSrÀ)rOr^rVrèrÆr¯Ú switchpenr{�s(€Ý ‰8Œ8ð Ý ‰DŒDˆDˆDˆDå ‰DŒDˆDˆDˆDrÆcó—t¦«td¦«t¦«td¦«t ¦«t d¦«t d¦«D]”}|dkrt¦«t d¦«D] }td¦«td¦«Œ!|dkrtd¦«t¦«t¦«td ¦«t ¦«Œ•t d ¦«td ¦«td ¦«t¦«td¦«td¦«td¦«td¦«td ¦«t ¦«tdd ¦«tdd ¦«td¦«t d¦«D]>}td¦«td¦«td¦«td¦«Œ?td¦«t¦«t d¦«D]>}td¦«td¦«td¦«td¦«Œ?t¦«dS)zDemo of old turtle.py - moduleTédrŠrrir˜éZÚmaroonrGrÉr�Fé´Ú startstartrêÚredrdN)rar+rzr1r>r{rr2rDrQr:r?r`r|)r rs r¯Údemo1rƒ£s €å ‰ŒˆÝˆt‰ Œ ˆ Ý ‰ŒˆÝ�‰ Œ ˆ Ý ‰Œˆå ˆa‰ŒˆÝ�q‘”ð ð ˆAØ�AŠvˆvÝ‘ ” � ݘ1‘X”Xð ð �ݘ‘ ” � Ý�R‘”��Ø�AŠvˆvÝ�h‘”�Ý‘ ” � Ý ‰DŒDˆDÝ �B‰KŒKˆKÝ ‰FŒFˆFˆFÝ ˆa‰ŒˆÝ ˆg‰Œˆåˆu‰ Œ ˆ Ý ‰ŒˆÝ ˆb‰ Œ ˆ Ý�‰ Œ ˆ Ý ˆb‰ Œ ˆ Ý�‰ Œ ˆ Ý ˆc‰ Œ ˆ Ý ‰Œˆå ˆl˜AÑÔÐÝ ˆg�qÑÔÐÝ ˆe‰ Œ ˆ å�q‘”ð ð ˆAÝ �B‰KŒKˆKÝ �‰HŒHˆHÝ �B‰KŒKˆKÝ �"‰IŒIˆIˆIåˆt‰ Œ ˆ ݉ Œ ˆ Ý�q‘”ð ð ˆAÝ �B‰KŒKˆKÝ �‰HŒHˆHÝ �B‰KŒKˆKÝ �"‰IŒIˆIˆI݉ Œ ˆ ˆ ˆ rÆcó: —td¦«t¦«td¦«tt dd¦«¦«t dd¦«dz }t d¦«td¦«D] }t¦«t|d¦«Œ!td¦«t¦«rt¦«t¦«°t¦«td¦«td ¦«d}t!d ¦«td¦«td ¦«td d ¦«D]£}|dkr(t#¦«t%d d|zz dd|z¦«td¦«D] }t'|¦«td¦«Œ!t)¦«|dz }td¦«tt¦«dzdz¦«Œ¤td¦«t+¦«t'd¦«t d¦«t-¦«t/dd¦«td¦«t#¦«td¦«D]?}tdd¦«t d¦«t'd¦«t d¦«Œ@t)¦«td¦«t+¦«t'd¦«t-¦«t1d¦«t3¦«}| d¦«t7¦«}| d¦«| d¦«|  ¦«| d¦«| d¦«| ¦«| dd¦«| d¦«| ¦«| d¦«| dd¦«| d¦«| d¦«tt |¦«¦«d}| |¦«dkrÄ| d¦«| d ¦«| | |¦«¦«| d¦«|d!zdkr6|  ¦«|  ¦«t¦«|dz }| |¦«dk°Ä|  d"d#d$¬%¦«| d&¦«| d¦«d'„}tCj"d¦«t¦«r6|  ¦«|  ¦«t¦«°6| d¦«|  d(d)¬*¦«| #|d¦«d+S),zDemo of some new features.rÉrŠrrr~érŠzwait a moment...r­Úgreenr€r[rZééxé éFrGr‚Úyellowrié2r“rFié(rjÚblueÚorangerg @g333333ã?r˜zCAUGHT! )r rZÚboldr`)rÈrËr�có>—t¦«t¦«dSrÀ)rr)rÛrÜs r¯Úbabazdemo2..baba.s€Ý ‰MŒMˆMÝ ‰EŒEˆEˆEˆErÆz Click me!)ÚCourierr‰r�)rÈN)$rqrrrZrervr<rcrr{r5r|ryrxrarRrrXr2rBrAr?r^rVr:rlrIrbr rQrzrJr>rsÚtimeÚsleeprS)r%rÚlaenger Útrir“rPr’s r¯Údemo2r˜Øs%€å ˆa‰ŒˆÝ ‰ŒˆÝ�‰ Œ ˆ Ý•7˜1˜a‘=”=Ñ!Ô!Ð!ݘ!˜Q‘” Ñ#ˆÝ ˆ2‰ŒˆÝ�r‘”ð ð ˆAÝ ‰KŒKˆKÝ �6˜2Ñ Ô Ð Ð Ý Ð Ñ!Ô!Ð!ÝÑ!Ô!ð Ý ‰FŒFˆFõ Ñ!Ô!ð å ‰ŒˆÝ ˆ2‰ŒˆÝ�#‰ŒˆØˆÝ�ÑÔÐÝ�‰ Œ ˆ Ý ˆ3‰ŒˆÝ�r˜2‘”ð "ð "ˆAØ�1ŠuˆuÝ‘ ” � ݘ#˜b ™d™( A r¨!¡tÑ,Ô,Ð,ݘ1‘X”Xð ð �Ý�6‘ ” � Ý�3‘”��Ý ‰JŒJˆJØ �b‰LˆFÝ ˆr‰FŒFˆFÝ •5‘7”7˜1‘9˜b‘.Ñ !Ô !Ð !Ð !õ ˆ3‰ŒˆÝ ‰ŒˆÝ ˆ2‰ŒˆÝ ˆ2‰ŒˆÝ ‰ŒˆÝ ˆe�HÑÔÐÝ ˆa‰ŒˆÝ‰ Œ ˆ Ý�q‘”ð ð ˆAÝ �2�r‰NŒNˆNÝ ˆr‰FŒFˆFÝ ˆr‰FŒFˆFÝ ˆr‰FŒFˆFˆF݉ Œ ˆ Ý ˆ2‰ŒˆÝ ‰ŒˆÝ ˆ2‰ŒˆÝ ‰ŒˆÝ ˆh‰Œˆå‰kŒkˆØ �Š�vÑÔÐÝ‘”ˆØ×Ò˜&Ñ!Ô!Ð!Ø� Š �XÑÔÐØ� Š ‰ŒˆØ� Š �B‰ŒˆØ� Š �Q‰ŒˆØ� Š ‰ Œ ˆ Ø� Š �C˜ÑÔÐØ� Š �"‰ Œ ˆ Ø� Š ‰ Œ ˆ Ø� Š �Q‰ŒˆØ� Š �V˜HÑ%Ô%Ð%Ø�Š�qÑÔÐØ � Š �!‰ Œ ˆ Ý•7˜6‘?”?Ñ#Ô#Ð#؈Ø�lŠl˜6Ñ"Ô" QÒ&Ð&Ø �IŠI�c‰NŒNˆNØ �IŠI�c‰NŒNˆNØ �NŠN˜3Ÿ;š; vÑ.Ô.Ñ /Ô /Ð /Ø �FŠF�1‰IŒIˆIØ�r‰z˜QŠˆØ— ’ ‘”�Ø— ’ ‘ ” � Ý‘ ” � Ø �Q‰JˆEð�lŠl˜6Ñ"Ô" QÒ&Ð&ð � Š �*Ð#8Àˆ ÑHÔHÐHØ � Š �WÑÔÐØ � Š �UÑÔÐð ð ð õ Œ �1‰ Œ ˆ åÑ!Ô!ð Ø �HŠH‰JŒJˆJØ �KŠK‰MŒMˆMõ Ñ!Ô!ð ð �Šˆr‰ Œ ˆ Ø � Š �-Ð(?ˆ ÑAÔAÐAØ � Š �D˜!ÑÔÐÐÐrÆ)rè)r5)GrïÚ_verÚtkinterr/rùrÜr”rJr„r®Úos.pathrrrÚcopyrrÚ _tg_classesr9r:Ú _tg_utilitiesÚ__all__r8r¶r°r½rµr¤rÁrrõrrrr0rr4rkriÚobjectr…r�r5rrDr rär5rzr r r r…r rrrDÚ _LANGUAGEÚ ImportErrorrWrerirprxrr€rìr{rƒr˜rrèrÆr¯úr£sxðð2LðLð\7€ðÐÐÐØ € € € Ø € € € Ø € € € Ø€€€Ø € € € Ø€€€à'Ð'Ð'Ð'Ð'Ð'Ð'Ð'Ð'Ð'ØÐÐÐÐÐØ Ð Ð Ð Ð Ð ðIðIðI€ ð)ð)ð)Ðð !ð !ð !Ðð'¨Ð/€ à Ð-Ñ -Ð0DÑ DØ ñ Ø(˜>ñ *€ð,ð,ð,€ ð ˆ�#ð Ø�4ð à�cð ð �cð ð �Tð  ð �Tð  ð � ð  ð �Sð ð �ð ð ˜$ð ð �ð ð �Wð ð �gð ð �zð ð �Dð ð �Ið ð ˜ð! ð""Ø)Øð' ð ð €ð,ððð:ððð<1Ø€JˆtÑÔÐÐøØð1ð1ð1Ø €EÐ /Ñ0Ô0Ð0Ð0Ð0ð1øøøð*$ð*$ð*$ð*$ð*$ˆEñ*$ô*$ð*$ðjðððððð1ð ð.ð.ð.ð.ð*a#ða#ða#ða#ða#�R”Xña#ôa#ða#ðFÐ� ¤¨IÑ6Ô6Ð6ð)ð)ð)ð)ð)ˆBŒEñ)ô)ð)ð0 Œ€ðE5ðE5ðE5ðE5ðE5�vñE5ôE5ðE5ðZ  ð ð ð ð �)ñ ô ð ððððð˜)ñôðð ,1ð,1ð,1ð,1ð,1ˆFñ,1ô,1ð,1ð^"6ð"6ð"6ð"6ð"6ˆfñ"6ô"6ð"6ðLiðiðiðiðiÐ#ñiôiðiðV|ð|ð|ð|ð|�ñ|ô|ð|ð~IðIðIðIðIˆ6ñIôIðIðXLðLðLðLðL�6ñLôLðLð>DðDðDðDðD��jñDôDðDðL$ €ððððCðCðCðCðCˆlñCôCðCðJ,ð,ð,ð,ð,ˆYñ,ô,ð,ð( €ð ð ð ð ðD3ð3ð3ð" �Ô € ðMØ�IÒÐØˆ˜ Ñ"Ô"Ð"øøØð1ð1ð1Ø €EÐ $ iÑ0Ô0Ð0Ð0Ð0ØðMðMðMØ €EÐ HØBKñ LñMôMðMðMðMðMøøøð ððð> ð ð ð ð ð ð € ð Bð Bð BðÐÐ'¨Ø# ZÐ1BñDôDðDàÐÐ'¨Ø  *Ð.?ñAôAðAð€à ˆzÒÐðððð 2ð2ð2ðjaðaðaðF €E�G„G€GØ €E�G„G€GØ€K�M„M€M€M€MðCÐs* B(Â(B;Â:B;ÇG)Ç)HÇ<HÈH