From a78dfc05ef955c2614536ef221828299f16a0a7a Mon Sep 17 00:00:00 2001 From: Wulian Date: Fri, 18 Oct 2024 19:36:58 +0800 Subject: [PATCH 1/7] Replace turtledemo docstring with correct file name --- Doc/library/turtle.rst | 2 +- Lib/turtledemo/bytedesign.py | 2 +- Lib/turtledemo/chaos.py | 11 +++++++---- Lib/turtledemo/clock.py | 3 --- Lib/turtledemo/colormixer.py | 4 +++- Lib/turtledemo/forest.py | 6 +++--- Lib/turtledemo/fractalcurves.py | 4 ++-- Lib/turtledemo/lindenmayer.py | 2 +- Lib/turtledemo/minimal_hanoi.py | 5 +---- Lib/turtledemo/nim.py | 2 +- Lib/turtledemo/paint.py | 4 +--- Lib/turtledemo/peace.py | 2 +- Lib/turtledemo/penrose.py | 6 +++--- Lib/turtledemo/planet_and_moon.py | 4 ++-- Lib/turtledemo/rosette.py | 2 +- Lib/turtledemo/round_dance.py | 5 +---- Lib/turtledemo/sorting_animate.py | 12 ++++-------- Lib/turtledemo/tree.py | 2 +- Lib/turtledemo/two_canvases.py | 4 +++- Lib/turtledemo/yinyang.py | 4 ++-- 20 files changed, 39 insertions(+), 47 deletions(-) diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index efa4b6f8f1d3f9..1690bcc1fffbed 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -2778,7 +2778,7 @@ Changes since Python 3.0 :func:`Screen.numinput `. These pop up input dialogs and return strings and numbers respectively. -- Two example scripts :file:`tdemo_nim.py` and :file:`tdemo_round_dance.py` +- Two example scripts :file:`nim.py` and :file:`round_dance.py` have been added to the :file:`Lib/turtledemo` directory. diff --git a/Lib/turtledemo/bytedesign.py b/Lib/turtledemo/bytedesign.py index 476cdaabfceab1..edda6e59953e79 100644 --- a/Lib/turtledemo/bytedesign.py +++ b/Lib/turtledemo/bytedesign.py @@ -1,6 +1,6 @@ """ turtle-example-suite: - tdemo_bytedesign.py + turtledemo/bytedesign.py An example adapted from the example-suite of PythonCard's turtle graphics. diff --git a/Lib/turtledemo/chaos.py b/Lib/turtledemo/chaos.py index 6a45d0d807ef0b..d859f482b8294c 100644 --- a/Lib/turtledemo/chaos.py +++ b/Lib/turtledemo/chaos.py @@ -1,9 +1,12 @@ -# File: tdemo_chaos.py -# Author: Gregor Lingl -# Date: 2009-06-24 +""" turtle-example-suite: -# A demonstration of chaos + turtledemo/chaos.py +A demonstration of chaos + +Author: Gregor Lingl +2009-06-24 +""" from turtle import * N = 80 diff --git a/Lib/turtledemo/clock.py b/Lib/turtledemo/clock.py index 8a630e29b8da50..364633e00e9100 100644 --- a/Lib/turtledemo/clock.py +++ b/Lib/turtledemo/clock.py @@ -4,9 +4,6 @@ Enhanced clock-program, showing date and time - ------------------------------------ - Press STOP to exit the program! - ------------------------------------ """ from turtle import * from datetime import datetime diff --git a/Lib/turtledemo/colormixer.py b/Lib/turtledemo/colormixer.py index 448db83361a649..211b77e01359a4 100644 --- a/Lib/turtledemo/colormixer.py +++ b/Lib/turtledemo/colormixer.py @@ -1,5 +1,7 @@ -# colormixer +""" turtle-example-suite: + turtledemo/colormixer.py +""" from turtle import Screen, Turtle, mainloop class ColorTurtle(Turtle): diff --git a/Lib/turtledemo/forest.py b/Lib/turtledemo/forest.py index cac553223828db..0fe884f8d7cd04 100644 --- a/Lib/turtledemo/forest.py +++ b/Lib/turtledemo/forest.py @@ -1,6 +1,6 @@ -""" turtlegraphics-example-suite: +""" turtle-example-suite: - tdemo_forest.py + turtledemo/forest.py Displays a 'forest' of 3 breadth-first-trees similar to the one in tree. @@ -8,7 +8,7 @@ This example is a 'breadth-first'-rewrite of a Logo program written by Erich Neuwirth. See -http://homepage.univie.ac.at/erich.neuwirth/ +https://homepage.univie.ac.at/erich.neuwirth/ """ from turtle import Turtle, colormode, tracer, mainloop from random import randrange diff --git a/Lib/turtledemo/fractalcurves.py b/Lib/turtledemo/fractalcurves.py index fda193e06fedee..98dc9f5e88b587 100644 --- a/Lib/turtledemo/fractalcurves.py +++ b/Lib/turtledemo/fractalcurves.py @@ -1,6 +1,6 @@ -""" turtle-example-suite: +""" turtle-example-suite: - tdemo_fractalCurves.py + turtledemo/fractalcurves.py This program draws two fractal-curve-designs: (1) A hilbert curve (in a box) diff --git a/Lib/turtledemo/lindenmayer.py b/Lib/turtledemo/lindenmayer.py index 7c7a84796c3c28..06adbc8581933b 100644 --- a/Lib/turtledemo/lindenmayer.py +++ b/Lib/turtledemo/lindenmayer.py @@ -1,6 +1,6 @@ """ turtle-example-suite: - xtx_lindenmayer_indian.py + turtledemo/lindenmayer.py Each morning women in Tamil Nadu, in southern India, place designs, created by using rice diff --git a/Lib/turtledemo/minimal_hanoi.py b/Lib/turtledemo/minimal_hanoi.py index 08d8b630fec3b4..72ee11c6eb45f2 100644 --- a/Lib/turtledemo/minimal_hanoi.py +++ b/Lib/turtledemo/minimal_hanoi.py @@ -1,6 +1,6 @@ """ turtle-example-suite: - tdemo_minimal_hanoi.py + turtledemo/minimal_hanoi.py A minimal 'Towers of Hanoi' animation: A tower of 6 discs is transferred from the @@ -12,9 +12,6 @@ Discs are turtles with shape "square", but stretched to rectangles by shapesize() - --------------------------------------- - To exit press STOP button - --------------------------------------- """ from turtle import * diff --git a/Lib/turtledemo/nim.py b/Lib/turtledemo/nim.py index 9ae6cc5c01b903..b6e98faadb55cd 100644 --- a/Lib/turtledemo/nim.py +++ b/Lib/turtledemo/nim.py @@ -1,6 +1,6 @@ """ turtle-example-suite: - tdemo_nim.py + turtledemo/nim.py Play nim against the computer. The player who takes the last stick is the winner. diff --git a/Lib/turtledemo/paint.py b/Lib/turtledemo/paint.py index 6e63d004454589..e688a567249908 100644 --- a/Lib/turtledemo/paint.py +++ b/Lib/turtledemo/paint.py @@ -1,6 +1,6 @@ """ turtle-example-suite: - tdemo_paint.py + turtledemo/paint.py A simple event-driven paint program @@ -14,8 +14,6 @@ ------------------------------------------- Play around by clicking into the canvas using all three mouse buttons. - ------------------------------------------- - To exit press STOP button ------------------------------------------- """ from turtle import * diff --git a/Lib/turtledemo/peace.py b/Lib/turtledemo/peace.py index fd6abe390ef198..a8b3151b07d4c3 100644 --- a/Lib/turtledemo/peace.py +++ b/Lib/turtledemo/peace.py @@ -1,6 +1,6 @@ """ turtle-example-suite: - tdemo_peace.py + turtledemo/peace.py A simple drawing suitable as a beginner's programming example. Aside from the diff --git a/Lib/turtledemo/penrose.py b/Lib/turtledemo/penrose.py index ac12c899d3844e..e981ab3d242802 100644 --- a/Lib/turtledemo/penrose.py +++ b/Lib/turtledemo/penrose.py @@ -1,6 +1,6 @@ -""" xturtle-example-suite: +""" turtle-example-suite: - xtx_kites_and_darts.py + turtledemo/penrose.py Constructs two aperiodic penrose-tilings, consisting of kites and darts, by the method @@ -11,7 +11,7 @@ consisting of five darts. For more information see: - http://en.wikipedia.org/wiki/Penrose_tiling + https://en.wikipedia.org/wiki/Penrose_tiling ------------------------------------------- """ from turtle import * diff --git a/Lib/turtledemo/planet_and_moon.py b/Lib/turtledemo/planet_and_moon.py index c0e2c5b79e173e..db4803e4d58b6d 100644 --- a/Lib/turtledemo/planet_and_moon.py +++ b/Lib/turtledemo/planet_and_moon.py @@ -1,6 +1,6 @@ -""" turtle-example-suite: +""" turtle-example-suite: - tdemo_planets_and_moon.py + turtledemo/planets_and_moon.py Gravitational system simulation using the approximation method from Feynman-lectures, diff --git a/Lib/turtledemo/rosette.py b/Lib/turtledemo/rosette.py index 47d0f00e9da9d1..81960e1009924d 100644 --- a/Lib/turtledemo/rosette.py +++ b/Lib/turtledemo/rosette.py @@ -1,6 +1,6 @@ """ turtle-example-suite: - tdemo_wikipedia3.py + turtledemo/rosette.py This example is inspired by the Wikipedia article on turtle diff --git a/Lib/turtledemo/round_dance.py b/Lib/turtledemo/round_dance.py index 10383614c6e974..77cf9f872f15b2 100644 --- a/Lib/turtledemo/round_dance.py +++ b/Lib/turtledemo/round_dance.py @@ -1,9 +1,6 @@ """ turtle-example-suite: - tdemo_round_dance.py - -(Needs version 1.1 of the turtle module that -comes with Python 3.1) + turtledemo/round_dance.py Dancing turtles have a compound shape consisting of a series of triangles of diff --git a/Lib/turtledemo/sorting_animate.py b/Lib/turtledemo/sorting_animate.py index ef4946db38250e..28780ef0f90a5a 100644 --- a/Lib/turtledemo/sorting_animate.py +++ b/Lib/turtledemo/sorting_animate.py @@ -1,6 +1,6 @@ -""" +""" turtle-example-suite: - sorting_animation.py + turtledemo/sorting_animation.py A minimal sorting algorithm animation: Sorts a shelf of 10 blocks using insertion @@ -10,9 +10,6 @@ Blocks are turtles with shape "square", but stretched to rectangles by shapesize() - --------------------------------------- - To exit press space button - --------------------------------------- """ from turtle import * import random @@ -183,7 +180,6 @@ def enable_keys(): onkey(start_ssort, "s") onkey(start_qsort, "q") onkey(randomize, "r") - onkey(bye, "space") def main(): getscreen().clearscreen() @@ -195,8 +191,8 @@ def main(): listen() return "EVENTLOOP" -instructions1 = "press i for insertion sort, s for selection sort, q for quicksort" -instructions2 = "spacebar to quit, r to randomize" +instructions1 = "press i for insertion sort, s for selection sort" +instructions2 = ", q for quicksort, r to randomize" if __name__=="__main__": msg = main() diff --git a/Lib/turtledemo/tree.py b/Lib/turtledemo/tree.py index 12729e23688a48..def52f09b38b1c 100644 --- a/Lib/turtledemo/tree.py +++ b/Lib/turtledemo/tree.py @@ -1,6 +1,6 @@ """ turtle-example-suite: - tdemo_tree.py + turtledemo/tree.py Displays a 'breadth-first-tree' - in contrast to the classical Logo tree drawing programs, diff --git a/Lib/turtledemo/two_canvases.py b/Lib/turtledemo/two_canvases.py index f3602585ab0592..ffb89e7749468b 100644 --- a/Lib/turtledemo/two_canvases.py +++ b/Lib/turtledemo/two_canvases.py @@ -1,4 +1,6 @@ -"""turtledemo.two_canvases +""" turtle-example-suite: + + turtledemo/two_canvases.py Use TurtleScreen and RawTurtle to draw on two distinct canvases in a separate window. The diff --git a/Lib/turtledemo/yinyang.py b/Lib/turtledemo/yinyang.py index 791060d17e6b6a..07af34916704f6 100644 --- a/Lib/turtledemo/yinyang.py +++ b/Lib/turtledemo/yinyang.py @@ -1,6 +1,6 @@ -""" turtle-example-suite: +""" turtle-example-suite: - tdemo_yinyang.py + turtledemo/yinyang.py Another drawing suitable as a beginner's programming example. From e3e68a72be9081b47b6c5231ea360746abf856fd Mon Sep 17 00:00:00 2001 From: Wulian Date: Mon, 21 Oct 2024 19:55:25 +0800 Subject: [PATCH 2/7] slove requested changes --- Doc/library/turtle.rst | 3 --- Lib/turtledemo/chaos.py | 3 --- Lib/turtledemo/colormixer.py | 5 +---- Lib/turtledemo/forest.py | 4 ---- Lib/turtledemo/sorting_animate.py | 5 +++-- 5 files changed, 4 insertions(+), 16 deletions(-) diff --git a/Doc/library/turtle.rst b/Doc/library/turtle.rst index 1690bcc1fffbed..8eb4f8271fcfae 100644 --- a/Doc/library/turtle.rst +++ b/Doc/library/turtle.rst @@ -2778,9 +2778,6 @@ Changes since Python 3.0 :func:`Screen.numinput `. These pop up input dialogs and return strings and numbers respectively. -- Two example scripts :file:`nim.py` and :file:`round_dance.py` - have been added to the :file:`Lib/turtledemo` directory. - .. doctest:: :skipif: _tkinter is None diff --git a/Lib/turtledemo/chaos.py b/Lib/turtledemo/chaos.py index d859f482b8294c..447a505c6fea24 100644 --- a/Lib/turtledemo/chaos.py +++ b/Lib/turtledemo/chaos.py @@ -3,9 +3,6 @@ turtledemo/chaos.py A demonstration of chaos - -Author: Gregor Lingl -2009-06-24 """ from turtle import * diff --git a/Lib/turtledemo/colormixer.py b/Lib/turtledemo/colormixer.py index 211b77e01359a4..f66012c8154317 100644 --- a/Lib/turtledemo/colormixer.py +++ b/Lib/turtledemo/colormixer.py @@ -1,7 +1,4 @@ -""" turtle-example-suite: - - turtledemo/colormixer.py -""" +"""turtledemo/colormixer.py""" from turtle import Screen, Turtle, mainloop class ColorTurtle(Turtle): diff --git a/Lib/turtledemo/forest.py b/Lib/turtledemo/forest.py index 0fe884f8d7cd04..656d0402afb8f3 100644 --- a/Lib/turtledemo/forest.py +++ b/Lib/turtledemo/forest.py @@ -5,10 +5,6 @@ Displays a 'forest' of 3 breadth-first-trees similar to the one in tree. For further remarks see tree.py - -This example is a 'breadth-first'-rewrite of -a Logo program written by Erich Neuwirth. See -https://homepage.univie.ac.at/erich.neuwirth/ """ from turtle import Turtle, colormode, tracer, mainloop from random import randrange diff --git a/Lib/turtledemo/sorting_animate.py b/Lib/turtledemo/sorting_animate.py index 28780ef0f90a5a..052ef6dd9ce16f 100644 --- a/Lib/turtledemo/sorting_animate.py +++ b/Lib/turtledemo/sorting_animate.py @@ -180,6 +180,7 @@ def enable_keys(): onkey(start_ssort, "s") onkey(start_qsort, "q") onkey(randomize, "r") + onkey(bye, "space") def main(): getscreen().clearscreen() @@ -191,8 +192,8 @@ def main(): listen() return "EVENTLOOP" -instructions1 = "press i for insertion sort, s for selection sort" -instructions2 = ", q for quicksort, r to randomize" +instructions1 = "press i for insertion sort, s for selection sort, q for quicksort" +instructions2 = "spacebar to quit, r to randomize" if __name__=="__main__": msg = main() From c129ae548fbcb8e5545bef0fe17c65a43afcc4f4 Mon Sep 17 00:00:00 2001 From: Wulian Date: Tue, 22 Oct 2024 19:45:24 +0800 Subject: [PATCH 3/7] resolve sugggestions --- Lib/turtledemo/colormixer.py | 3 ++- Lib/turtledemo/forest.py | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Lib/turtledemo/colormixer.py b/Lib/turtledemo/colormixer.py index f66012c8154317..a87e03c81db158 100644 --- a/Lib/turtledemo/colormixer.py +++ b/Lib/turtledemo/colormixer.py @@ -1,4 +1,5 @@ -"""turtledemo/colormixer.py""" +"""turtledemo/colormixer.py +""" from turtle import Screen, Turtle, mainloop class ColorTurtle(Turtle): diff --git a/Lib/turtledemo/forest.py b/Lib/turtledemo/forest.py index 656d0402afb8f3..f7daf76485d595 100644 --- a/Lib/turtledemo/forest.py +++ b/Lib/turtledemo/forest.py @@ -2,9 +2,12 @@ turtledemo/forest.py -Displays a 'forest' of 3 breadth-first-trees -similar to the one in tree. -For further remarks see tree.py +Displays a 'forest' of 3 breadth-first trees, +similar to the one in tree.py. +For further details, see tree.py. + +This example is a breadth-first rewrite of +a Logo program by Erich Neuwirth. """ from turtle import Turtle, colormode, tracer, mainloop from random import randrange From 739944bc26681cf001c464483de2ee3857993b23 Mon Sep 17 00:00:00 2001 From: Wulian Date: Tue, 22 Oct 2024 19:50:02 +0800 Subject: [PATCH 4/7] reslove suggestion 1 --- Lib/turtledemo/bytedesign.py | 4 +--- Lib/turtledemo/chaos.py | 4 +--- Lib/turtledemo/clock.py | 4 +--- Lib/turtledemo/colormixer.py | 3 +-- Lib/turtledemo/forest.py | 4 +--- Lib/turtledemo/fractalcurves.py | 4 +--- Lib/turtledemo/lindenmayer.py | 4 +--- Lib/turtledemo/minimal_hanoi.py | 4 +--- Lib/turtledemo/nim.py | 4 +--- Lib/turtledemo/paint.py | 4 +--- Lib/turtledemo/peace.py | 4 +--- Lib/turtledemo/penrose.py | 4 +--- Lib/turtledemo/planet_and_moon.py | 4 +--- Lib/turtledemo/rosette.py | 4 +--- Lib/turtledemo/round_dance.py | 4 +--- Lib/turtledemo/sorting_animate.py | 4 +--- Lib/turtledemo/tree.py | 4 +--- Lib/turtledemo/two_canvases.py | 4 +--- Lib/turtledemo/yinyang.py | 4 +--- 19 files changed, 19 insertions(+), 56 deletions(-) diff --git a/Lib/turtledemo/bytedesign.py b/Lib/turtledemo/bytedesign.py index edda6e59953e79..a5d76a6b6ff295 100644 --- a/Lib/turtledemo/bytedesign.py +++ b/Lib/turtledemo/bytedesign.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/bytedesign.py +"""turtledemo/bytedesign.py An example adapted from the example-suite of PythonCard's turtle graphics. diff --git a/Lib/turtledemo/chaos.py b/Lib/turtledemo/chaos.py index 447a505c6fea24..ae1a6f709cb3d9 100644 --- a/Lib/turtledemo/chaos.py +++ b/Lib/turtledemo/chaos.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/chaos.py +"""turtledemo/chaos.py A demonstration of chaos """ diff --git a/Lib/turtledemo/clock.py b/Lib/turtledemo/clock.py index 364633e00e9100..7a664a5a76f8d1 100644 --- a/Lib/turtledemo/clock.py +++ b/Lib/turtledemo/clock.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/clock.py +"""turtledemo/clock.py Enhanced clock-program, showing date and time diff --git a/Lib/turtledemo/colormixer.py b/Lib/turtledemo/colormixer.py index a87e03c81db158..f66012c8154317 100644 --- a/Lib/turtledemo/colormixer.py +++ b/Lib/turtledemo/colormixer.py @@ -1,5 +1,4 @@ -"""turtledemo/colormixer.py -""" +"""turtledemo/colormixer.py""" from turtle import Screen, Turtle, mainloop class ColorTurtle(Turtle): diff --git a/Lib/turtledemo/forest.py b/Lib/turtledemo/forest.py index f7daf76485d595..e1fa85a577ffce 100644 --- a/Lib/turtledemo/forest.py +++ b/Lib/turtledemo/forest.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/forest.py +"""turtledemo/forest.py Displays a 'forest' of 3 breadth-first trees, similar to the one in tree.py. diff --git a/Lib/turtledemo/fractalcurves.py b/Lib/turtledemo/fractalcurves.py index 98dc9f5e88b587..2d0a506a4f5b9f 100644 --- a/Lib/turtledemo/fractalcurves.py +++ b/Lib/turtledemo/fractalcurves.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/fractalcurves.py +"""turtledemo/fractalcurves.py This program draws two fractal-curve-designs: (1) A hilbert curve (in a box) diff --git a/Lib/turtledemo/lindenmayer.py b/Lib/turtledemo/lindenmayer.py index 06adbc8581933b..eb309afb9381b1 100644 --- a/Lib/turtledemo/lindenmayer.py +++ b/Lib/turtledemo/lindenmayer.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/lindenmayer.py +"""turtledemo/lindenmayer.py Each morning women in Tamil Nadu, in southern India, place designs, created by using rice diff --git a/Lib/turtledemo/minimal_hanoi.py b/Lib/turtledemo/minimal_hanoi.py index 72ee11c6eb45f2..e44330eaaf7f18 100644 --- a/Lib/turtledemo/minimal_hanoi.py +++ b/Lib/turtledemo/minimal_hanoi.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/minimal_hanoi.py +"""turtledemo/minimal_hanoi.py A minimal 'Towers of Hanoi' animation: A tower of 6 discs is transferred from the diff --git a/Lib/turtledemo/nim.py b/Lib/turtledemo/nim.py index b6e98faadb55cd..f87c479714d662 100644 --- a/Lib/turtledemo/nim.py +++ b/Lib/turtledemo/nim.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/nim.py +"""turtledemo/nim.py Play nim against the computer. The player who takes the last stick is the winner. diff --git a/Lib/turtledemo/paint.py b/Lib/turtledemo/paint.py index e688a567249908..87957467ab695a 100644 --- a/Lib/turtledemo/paint.py +++ b/Lib/turtledemo/paint.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/paint.py +"""turtledemo/paint.py A simple event-driven paint program diff --git a/Lib/turtledemo/peace.py b/Lib/turtledemo/peace.py index a8b3151b07d4c3..d86c94a48a2472 100644 --- a/Lib/turtledemo/peace.py +++ b/Lib/turtledemo/peace.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/peace.py +"""turtledemo/peace.py A simple drawing suitable as a beginner's programming example. Aside from the diff --git a/Lib/turtledemo/penrose.py b/Lib/turtledemo/penrose.py index e981ab3d242802..ceaefedac24a67 100644 --- a/Lib/turtledemo/penrose.py +++ b/Lib/turtledemo/penrose.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/penrose.py +"""turtledemo/penrose.py Constructs two aperiodic penrose-tilings, consisting of kites and darts, by the method diff --git a/Lib/turtledemo/planet_and_moon.py b/Lib/turtledemo/planet_and_moon.py index db4803e4d58b6d..571afcf922103f 100644 --- a/Lib/turtledemo/planet_and_moon.py +++ b/Lib/turtledemo/planet_and_moon.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/planets_and_moon.py +"""turtledemo/planets_and_moon.py Gravitational system simulation using the approximation method from Feynman-lectures, diff --git a/Lib/turtledemo/rosette.py b/Lib/turtledemo/rosette.py index 81960e1009924d..48897a620f9d8b 100644 --- a/Lib/turtledemo/rosette.py +++ b/Lib/turtledemo/rosette.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/rosette.py +"""turtledemo/rosette.py This example is inspired by the Wikipedia article on turtle diff --git a/Lib/turtledemo/round_dance.py b/Lib/turtledemo/round_dance.py index 77cf9f872f15b2..9da6389b213207 100644 --- a/Lib/turtledemo/round_dance.py +++ b/Lib/turtledemo/round_dance.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/round_dance.py +"""turtledemo/round_dance.py Dancing turtles have a compound shape consisting of a series of triangles of diff --git a/Lib/turtledemo/sorting_animate.py b/Lib/turtledemo/sorting_animate.py index 052ef6dd9ce16f..e0a2877cd5d621 100644 --- a/Lib/turtledemo/sorting_animate.py +++ b/Lib/turtledemo/sorting_animate.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/sorting_animation.py +"""turtledemo/sorting_animation.py A minimal sorting algorithm animation: Sorts a shelf of 10 blocks using insertion diff --git a/Lib/turtledemo/tree.py b/Lib/turtledemo/tree.py index def52f09b38b1c..6ad8fcc854a155 100644 --- a/Lib/turtledemo/tree.py +++ b/Lib/turtledemo/tree.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/tree.py +"""turtledemo/tree.py Displays a 'breadth-first-tree' - in contrast to the classical Logo tree drawing programs, diff --git a/Lib/turtledemo/two_canvases.py b/Lib/turtledemo/two_canvases.py index ffb89e7749468b..2c8020378edf1b 100644 --- a/Lib/turtledemo/two_canvases.py +++ b/Lib/turtledemo/two_canvases.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/two_canvases.py +"""turtledemo/two_canvases.py Use TurtleScreen and RawTurtle to draw on two distinct canvases in a separate window. The diff --git a/Lib/turtledemo/yinyang.py b/Lib/turtledemo/yinyang.py index 07af34916704f6..6e92d4bf739194 100644 --- a/Lib/turtledemo/yinyang.py +++ b/Lib/turtledemo/yinyang.py @@ -1,6 +1,4 @@ -""" turtle-example-suite: - - turtledemo/yinyang.py +"""turtledemo/yinyang.py Another drawing suitable as a beginner's programming example. From 6edbd15544f848c8b1f901e1045bd9737fd9d7db Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Wed, 23 Oct 2024 11:12:32 -0400 Subject: [PATCH 5/7] Update paint.py --- Lib/turtledemo/paint.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Lib/turtledemo/paint.py b/Lib/turtledemo/paint.py index 87957467ab695a..780300fb2da9d1 100644 --- a/Lib/turtledemo/paint.py +++ b/Lib/turtledemo/paint.py @@ -1,10 +1,9 @@ """turtledemo/paint.py -A simple event-driven paint program - -- left mouse button moves turtle -- middle mouse button changes color -- right mouse button toggles between pen up +A simple event-driven paint program. +- Left mouse button moves turtle. +- Middle mouse button changes color. +- Right mouse button toggles between pen up (no line drawn when the turtle moves) and pen down (line is drawn). If pen up follows at least two pen-down moves, the polygon that From e831222f4e45e4e36d20639006cb78e7eb51d0ae Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Wed, 23 Oct 2024 11:12:43 -0400 Subject: [PATCH 6/7] Update clock.py --- Lib/turtledemo/clock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/turtledemo/clock.py b/Lib/turtledemo/clock.py index 7a664a5a76f8d1..8b639066c4f440 100644 --- a/Lib/turtledemo/clock.py +++ b/Lib/turtledemo/clock.py @@ -1,7 +1,7 @@ """turtledemo/clock.py Enhanced clock-program, showing date -and time +and time. """ from turtle import * from datetime import datetime From 5bb609ef80ed08d369b64a20531df9dbd6f16122 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Wed, 23 Oct 2024 11:12:56 -0400 Subject: [PATCH 7/7] Update Lib/turtledemo/chaos.py --- Lib/turtledemo/chaos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/turtledemo/chaos.py b/Lib/turtledemo/chaos.py index ae1a6f709cb3d9..b25f0fa42c901d 100644 --- a/Lib/turtledemo/chaos.py +++ b/Lib/turtledemo/chaos.py @@ -1,6 +1,6 @@ """turtledemo/chaos.py -A demonstration of chaos +A demonstration of chaos. """ from turtle import *