| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1214,7 +1214,7 @@ Appearance | |||
| 1214 | 1214 | will be displayed stretched according to its stretchfactors: *stretch_wid* is | |
| 1215 | 1215 | stretchfactor perpendicular to its orientation, *stretch_len* is | |
| 1216 | 1216 | stretchfactor in direction of its orientation, *outline* determines the width | |
| 1217 | - of the shapes's outline. | ||
| 1217 | + of the shape's outline. | ||
| 1218 | 1218 | ||
| 1219 | 1219 | .. doctest:: | |
| 1220 | 1220 | :skipif: _tkinter is None | |
@@ -1545,7 +1545,7 @@ below: | |||
| 1545 | 1545 | ||
| 1546 | 1546 | 1. Create an empty Shape object of type "compound". | |
| 1547 | 1547 | 2. Add as many components to this object as desired, using the | |
| 1548 | - :meth:`addcomponent` method. | ||
| 1548 | + :meth:`~Shape.addcomponent` method. | ||
| 1549 | 1549 | ||
| 1550 | 1550 | For example: | |
| 1551 | 1551 | ||
@@ -2125,7 +2125,7 @@ Public classes | |||
| 2125 | 2125 | ||
| 2126 | 2126 | :param cv: a :class:`tkinter.Canvas` | |
| 2127 | 2127 | ||
| 2128 | - Provides screen oriented methods like :func:`setbg` etc. that are described | ||
| 2128 | + Provides screen oriented methods like :func:`bgcolor` etc. that are described | ||
| 2129 | 2129 | above. | |
| 2130 | 2130 | ||
| 2131 | 2131 | .. class:: Screen() | |
@@ -2315,7 +2315,9 @@ of this module or which better fits to your needs, e.g. for use in a classroom, | |||
| 2315 | 2315 | you can prepare a configuration file ``turtle.cfg`` which will be read at import | |
| 2316 | 2316 | time and modify the configuration according to its settings. | |
| 2317 | 2317 | ||
| 2318 | - The built in configuration would correspond to the following turtle.cfg:: | ||
| 2318 | + The built in configuration would correspond to the following ``turtle.cfg``: | ||
| 2319 | + | ||
| 2320 | + .. code-block:: ini | ||
| 2319 | 2321 | ||
| 2320 | 2322 | width = 0.5 | |
| 2321 | 2323 | height = 0.75 | |
@@ -2340,15 +2342,15 @@ The built in configuration would correspond to the following turtle.cfg:: | |||
| 2340 | 2342 | ||
| 2341 | 2343 | Short explanation of selected entries: | |
| 2342 | 2344 | ||
| 2343 | - - The first four lines correspond to the arguments of the :meth:`Screen.setup` | ||
| 2345 | + - The first four lines correspond to the arguments of the :func:`Screen.setup <setup>` | ||
| 2344 | 2346 | method. | |
| 2345 | 2347 | - Line 5 and 6 correspond to the arguments of the method | |
| 2346 | - :meth:`Screen.screensize`. | ||
| 2348 | + :func:`Screen.screensize <screensize>`. | ||
| 2347 | 2349 | - *shape* can be any of the built-in shapes, e.g: arrow, turtle, etc. For more | |
| 2348 | 2350 | info try ``help(shape)``. | |
| 2349 | - - If you want to use no fillcolor (i.e. make the turtle transparent), you have | ||
| 2351 | + - If you want to use no fill color (i.e. make the turtle transparent), you have | ||
| 2350 | 2352 | to write ``fillcolor = ""`` (but all nonempty strings must not have quotes in | |
| 2351 | - the cfg-file). | ||
| 2353 | + the cfg file). | ||
| 2352 | 2354 | - If you want to reflect the turtle its state, you have to use ``resizemode = | |
| 2353 | 2355 | auto``. | |
| 2354 | 2356 | - If you set e.g. ``language = italian`` the docstringdict | |
@@ -2398,6 +2400,8 @@ The :mod:`turtledemo` package directory contains: | |||
| 2398 | 2400 | ||
| 2399 | 2401 | The demo scripts are: | |
| 2400 | 2402 | ||
| 2403 | + .. currentmodule:: turtle | ||
| 2404 | + | ||
| 2401 | 2405 | .. tabularcolumns:: |l|L|L| | |
| 2402 | 2406 | ||
| 2403 | 2407 | +----------------+------------------------------+-----------------------+ | |
@@ -2469,44 +2473,44 @@ Have fun! | |||
| 2469 | 2473 | Changes since Python 2.6 | |
| 2470 | 2474 | ======================== | |
| 2471 | 2475 | ||
| 2472 | - - The methods :meth:`Turtle.tracer`, :meth:`Turtle.window_width` and | ||
| 2473 | - :meth:`Turtle.window_height` have been eliminated. | ||
| 2476 | + - The methods :func:`Turtle.tracer <tracer>`, :func:`Turtle.window_width <window_width>` and | ||
| 2477 | + :func:`Turtle.window_height <window_height>` have been eliminated. | ||
| 2474 | 2478 | Methods with these names and functionality are now available only | |
| 2475 | 2479 | as methods of :class:`Screen`. The functions derived from these remain | |
| 2476 | 2480 | available. (In fact already in Python 2.6 these methods were merely | |
| 2477 | 2481 | duplications of the corresponding | |
| 2478 | - :class:`TurtleScreen`/:class:`Screen`-methods.) | ||
| 2482 | + :class:`TurtleScreen`/:class:`Screen` methods.) | ||
| 2479 | 2483 | ||
| 2480 | - - The method :meth:`Turtle.fill` has been eliminated. | ||
| 2481 | - The behaviour of :meth:`begin_fill` and :meth:`end_fill` | ||
| 2482 | - have changed slightly: now every filling-process must be completed with an | ||
| 2484 | + - The method :func:`!Turtle.fill` has been eliminated. | ||
| 2485 | + The behaviour of :func:`begin_fill` and :func:`end_fill` | ||
| 2486 | + have changed slightly: now every filling process must be completed with an | ||
| 2483 | 2487 | ``end_fill()`` call. | |
| 2484 | 2488 | ||
| 2485 | - - A method :meth:`Turtle.filling` has been added. It returns a boolean | ||
| 2489 | + - A method :func:`Turtle.filling <filling>` has been added. It returns a boolean | ||
| 2486 | 2490 | value: ``True`` if a filling process is under way, ``False`` otherwise. | |
| 2487 | 2491 | This behaviour corresponds to a ``fill()`` call without arguments in | |
| 2488 | 2492 | Python 2.6. | |
| 2489 | 2493 | ||
| 2490 | 2494 | Changes since Python 3.0 | |
| 2491 | 2495 | ======================== | |
| 2492 | 2496 | ||
| 2493 | - - The methods :meth:`Turtle.shearfactor`, :meth:`Turtle.shapetransform` and | ||
| 2494 | - :meth:`Turtle.get_shapepoly` have been added. Thus the full range of | ||
| 2497 | + - The :class:`Turtle` methods :func:`shearfactor`, :func:`shapetransform` and | ||
| 2498 | + :func:`get_shapepoly` have been added. Thus the full range of | ||
| 2495 | 2499 | regular linear transforms is now available for transforming turtle shapes. | |
| 2496 | - :meth:`Turtle.tiltangle` has been enhanced in functionality: it now can | ||
| 2497 | - be used to get or set the tiltangle. :meth:`Turtle.settiltangle` has been | ||
| 2500 | + :func:`tiltangle` has been enhanced in functionality: it now can | ||
| 2501 | + be used to get or set the tilt angle. :func:`settiltangle` has been | ||
| 2498 | 2502 | deprecated. | |
| 2499 | 2503 | ||
| 2500 | - - The method :meth:`Screen.onkeypress` has been added as a complement to | ||
| 2501 | - :meth:`Screen.onkey` which in fact binds actions to the keyrelease event. | ||
| 2502 | - Accordingly the latter has got an alias: :meth:`Screen.onkeyrelease`. | ||
| 2504 | + - The :class:`Screen` method :func:`onkeypress` has been added as a complement to | ||
| 2505 | + :func:`onkey`. As the latter binds actions to the key release event, | ||
| 2506 | + an alias: :func:`onkeyrelease` was also added for it. | ||
| 2503 | 2507 | ||
| 2504 | - - The method :meth:`Screen.mainloop` has been added. So when working only | ||
| 2505 | - with Screen and Turtle objects one must not additionally import | ||
| 2506 | - :func:`mainloop` anymore. | ||
| 2508 | + - The method :func:`Screen.mainloop <mainloop>` has been added, | ||
| 2509 | + so there is no longer a need to use the standalone :func:`mainloop` function | ||
| 2510 | + when working with :class:`Screen` and :class:`Turtle` objects. | ||
| 2507 | 2511 | ||
| 2508 | - - Two input methods has been added :meth:`Screen.textinput` and | ||
| 2509 | - :meth:`Screen.numinput`. These popup input dialogs and return | ||
| 2512 | + - Two input methods have been added: :func:`Screen.textinput <textinput>` and | ||
| 2513 | + :func:`Screen.numinput <numinput>`. These pop up input dialogs and return | ||
| 2510 | 2514 | strings and numbers respectively. | |
| 2511 | 2515 | ||
| 2512 | 2516 | - Two example scripts :file:`tdemo_nim.py` and :file:`tdemo_round_dance.py` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -954,7 +954,7 @@ def __repr__(self): | |||
| 954 | 954 | ||
| 955 | 955 | ||
| 956 | 956 | class TurtleScreen(TurtleScreenBase): | |
| 957 | - """Provides screen oriented methods like setbg etc. | ||
| 957 | + """Provides screen oriented methods like bgcolor etc. | ||
| 958 | 958 | ||
| 959 | 959 | Only relies upon the methods of TurtleScreenBase and NOT | |
| 960 | 960 | upon components of the underlying graphics toolkit - | |
| Back | FazBrowse Home | New Git URL |
0 commit comments