|
38 | 38 | ----- turtle.py |
39 | 39 |
|
40 | 40 | This module is an extended reimplementation of turtle.py from the |
41 | | -Python standard distribution up to Python 2.5. (See: http:\\www.python.org) |
| 41 | +Python standard distribution up to Python 2.5. (See: http://www.python.org) |
42 | 42 |
|
43 | 43 | It tries to keep the merits of turtle.py and to be (nearly) 100% |
44 | 44 | compatible with it. This means in the first place to enable the |
|
54 | 54 |
|
55 | 55 | - Different turtle shapes, gif-images as turtle shapes, user defined |
56 | 56 | and user controllable turtle shapes, among them compound |
57 | | - (multicolored) shapes. Turtle shapes can be stgretched and tilted, which |
| 57 | + (multicolored) shapes. Turtle shapes can be stretched and tilted, which |
58 | 58 | makes turtles very versatile geometrical objects. |
59 | 59 |
|
60 | 60 | - Fine control over turtle movement and screen updates via delay(), |
|
64 | 64 | following the early Logo traditions. This reduces the boring work of |
65 | 65 | typing long sequences of commands, which often occur in a natural way |
66 | 66 | when kids try to program fancy pictures on their first encounter with |
67 | | - turtle graphcis. |
| 67 | + turtle graphics. |
68 | 68 |
|
69 | 69 | - Turtles now have an undo()-method with configurable undo-buffer. |
70 | 70 |
|
|
91 | 91 |
|
92 | 92 | - If configured appropriately the module reads in docstrings from a docstring |
93 | 93 | dictionary in some different language, supplied separately and replaces |
94 | | - the english ones by those read in. There is a utility function |
95 | | - write_docstringdict() to write a dictionary with the original (english) |
| 94 | + the English ones by those read in. There is a utility function |
| 95 | + write_docstringdict() to write a dictionary with the original (English) |
96 | 96 | docstrings to disc, so it can serve as a template for translations. |
97 | 97 |
|
98 | 98 | Behind the scenes there are some features included with possible |
99 | | -extensionsin in mind. These will be commented and documented elsewhere. |
| 99 | +extensions in in mind. These will be commented and documented elsewhere. |
100 | 100 |
|
101 | 101 | """ |
102 | 102 |
|
@@ -301,7 +301,7 @@ def __repr__(self): |
301 | 301 |
|
302 | 302 | ############################################################################## |
303 | 303 | ### From here up to line : Tkinter - Interface for turtle.py ### |
304 | | -### May be replaced by an interface to some different graphcis-toolkit ### |
| 304 | +### May be replaced by an interface to some different graphics toolkit ### |
305 | 305 | ############################################################################## |
306 | 306 |
|
307 | 307 | ## helper functions for Scrolled Canvas, to forward Canvas-methods |
@@ -380,7 +380,7 @@ def __init__(self, master, width=500, height=350, |
380 | 380 | self._rootwindow.bind('<Configure>', self.onResize) |
381 | 381 |
|
382 | 382 | def reset(self, canvwidth=None, canvheight=None, bg = None): |
383 | | - """Ajust canvas and scrollbars according to given canvas size.""" |
| 383 | + """Adjust canvas and scrollbars according to given canvas size.""" |
384 | 384 | if canvwidth: |
385 | 385 | self.canvwidth = canvwidth |
386 | 386 | if canvheight: |
@@ -776,7 +776,7 @@ def _rescale(self, xscalefactor, yscalefactor): |
776 | 776 | self.cv.coords(item, *newcoordlist) |
777 | 777 |
|
778 | 778 | def _resize(self, canvwidth=None, canvheight=None, bg=None): |
779 | | - """Resize the canvas, the turtles are drawing on. Does |
| 779 | + """Resize the canvas the turtles are drawing on. Does |
780 | 780 | not alter the drawing window. |
781 | 781 | """ |
782 | 782 | # needs amendment |
@@ -951,7 +951,7 @@ def __init__(self, cv, mode=_CFG["mode"], |
951 | 951 | def clear(self): |
952 | 952 | """Delete all drawings and all turtles from the TurtleScreen. |
953 | 953 |
|
954 | | - Reset empty TurtleScreen to it's initial state: white background, |
| 954 | + Reset empty TurtleScreen to its initial state: white background, |
955 | 955 | no backgroundimage, no eventbindings and tracing on. |
956 | 956 |
|
957 | 957 | No argument. |
@@ -1317,7 +1317,7 @@ def onkey(self, fun, key): |
1317 | 1317 | fun -- a function with no arguments |
1318 | 1318 | key -- a string: key (e.g. "a") or key-symbol (e.g. "space") |
1319 | 1319 |
|
1320 | | - In order ro be able to register key-events, TurtleScreen |
| 1320 | + In order to be able to register key-events, TurtleScreen |
1321 | 1321 | must have focus. (See method listen.) |
1322 | 1322 |
|
1323 | 1323 | Example (for a TurtleScreen instance named screen |
@@ -1399,7 +1399,7 @@ def bgpic(self, picname=None): |
1399 | 1399 | self._bgpicname = picname |
1400 | 1400 |
|
1401 | 1401 | def screensize(self, canvwidth=None, canvheight=None, bg=None): |
1402 | | - """Resize the canvas, the turtles are drawing on. |
| 1402 | + """Resize the canvas the turtles are drawing on. |
1403 | 1403 |
|
1404 | 1404 | Optional arguments: |
1405 | 1405 | canvwidth -- positive integer, new width of canvas in pixels |
@@ -1692,8 +1692,8 @@ def home(self): |
1692 | 1692 |
|
1693 | 1693 | No arguments. |
1694 | 1694 |
|
1695 | | - Move turtle to the origin - coordinates (0,0) and set it's |
1696 | | - heading to it's start-orientation (which depends on mode). |
| 1695 | + Move turtle to the origin - coordinates (0,0) and set its |
| 1696 | + heading to its start-orientation (which depends on mode). |
1697 | 1697 |
|
1698 | 1698 | Example (for a Turtle instance named turtle): |
1699 | 1699 | >>> turtle.home() |
@@ -2265,7 +2265,7 @@ def pen(self, pen=None, **pendict): |
2265 | 2265 | "outline" : positive number |
2266 | 2266 | "tilt" : number |
2267 | 2267 |
|
2268 | | - This dicionary can be used as argument for a subsequent |
| 2268 | + This dictionary can be used as argument for a subsequent |
2269 | 2269 | pen()-call to restore the former pen-state. Moreover one |
2270 | 2270 | or more of these attributes can be provided as keyword-arguments. |
2271 | 2271 | This can be used to set several pen attributes in one statement. |
@@ -2413,7 +2413,7 @@ def _setshape(self, shapeIndex): |
2413 | 2413 | class RawTurtle(TPen, TNavigator): |
2414 | 2414 | """Animation part of the RawTurtle. |
2415 | 2415 | Puts RawTurtle upon a TurtleScreen and provides tools for |
2416 | | - it's animation. |
| 2416 | + its animation. |
2417 | 2417 | """ |
2418 | 2418 | screens = [] |
2419 | 2419 |
|
@@ -2458,7 +2458,7 @@ def __init__(self, canvas=None, |
2458 | 2458 | self._update() |
2459 | 2459 |
|
2460 | 2460 | def reset(self): |
2461 | | - """Delete the turtle's drawings and restore it's default values. |
| 2461 | + """Delete the turtle's drawings and restore its default values. |
2462 | 2462 |
|
2463 | 2463 | No argument. |
2464 | 2464 | , |
@@ -2748,7 +2748,7 @@ def tiltangle(self): |
2748 | 2748 |
|
2749 | 2749 | Return the current tilt-angle, i. e. the angle between the |
2750 | 2750 | orientation of the turtleshape and the heading of the turtle |
2751 | | - (it's direction of movement). |
| 2751 | + (its direction of movement). |
2752 | 2752 |
|
2753 | 2753 | Examples (for a Turtle instance named turtle): |
2754 | 2754 | >>> turtle.shape("circle") |
@@ -2793,7 +2793,7 @@ def _polytrafo(self, poly): |
2793 | 2793 |
|
2794 | 2794 | def _drawturtle(self): |
2795 | 2795 | """Manages the correct rendering of the turtle with respect to |
2796 | | - it's shape, resizemode, strech and tilt etc.""" |
| 2796 | + its shape, resizemode, strech and tilt etc.""" |
2797 | 2797 | screen = self.screen |
2798 | 2798 | shape = screen._shapes[self.turtle.shapeIndex] |
2799 | 2799 | ttype = shape._type |
@@ -2847,7 +2847,7 @@ def _drawturtle(self): |
2847 | 2847 | ############################## stamp stuff ############################### |
2848 | 2848 |
|
2849 | 2849 | def stamp(self): |
2850 | | - """Stamp a copy of the turtleshape onto the canvas and return it's id. |
| 2850 | + """Stamp a copy of the turtleshape onto the canvas and return its id. |
2851 | 2851 |
|
2852 | 2852 | No argument. |
2853 | 2853 |
|
|
0 commit comments