Repository navigation
Turtledemo: exception and minor glitches. #58325
Copy link
Copy link
Closed
Labels
3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
| BPO | 14117 |
|---|---|
| Nosy | @rhettinger, @terryjreedy, @vstinner, @willingc, @miss-islington |
| PRs | |
| Dependencies | |
| Files |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = 'https://github.com/terryjreedy'
closed_at = <Date 2018-06-29.05:33:08.183>
created_at = <Date 2012-02-24.21:52:45.185>
labels = ['3.7', '3.8', 'type-bug', 'library']
title = 'Turtledemo: exception and minor glitches.'
updated_at = <Date 2018-10-24.22:47:40.911>
user = 'https://github.com/terryjreedy'bugs.python.org fields:
activity = <Date 2018-10-24.22:47:40.911>
actor = 'vstinner'
assignee = 'terry.reedy'
closed = True
closed_date = <Date 2018-06-29.05:33:08.183>
closer = 'terry.reedy'
components = ['Library (Lib)']
creation = <Date 2012-02-24.21:52:45.185>
creator = 'terry.reedy'
dependencies = ['21597', '21823', '21882', '21933', '21971', '22051']
files = ['38986']
hgrepos = []
issue_num = 14117
keywords = ['patch']
message_count = 15.0
messages = ['154164', '221482', '221509', '221518', '221980', '223774', '223783', '240876', '319752', '320696', '320697', '320699', '320701', '320702', '328398']
nosy_count = 7.0
nosy_names = ['rhettinger', 'terry.reedy', 'vstinner', 'python-dev', 'willingc', 'cabiad', 'miss-islington']
pr_nums = ['8002', '8003', '8004']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue14117'
versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.7 (EOL)end of lifeend of life3.8 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
terryjreedy commentedon Feb 24, 2012
Win7, 3.2.2, python -m turtledemo in Command Prompt Window
After running clock example, hitting Stop results in following:
Clock face, including hands, is erased. Day and date are left (intentional?), and the following appears back in command prompt window.
Demo continues to run.
Paint: Left clicking mouse moves dot without painting. Right clicking changes mode so left clicking draws line. It also causes some filling of enclosed regions. This double action is slightly obscure. The prompt on the bottom of the screen says "Use mouse/keys or Stop" As near as I can tell, keys are inactive. So prompt could delete '/keys'.
Module doc strings that explain each demo should be wrapped so that they appear in the code window without scrolling. Or the left window could be wider, especially if the user widens the window. 800x600 screens are pretty rare these days.
'Wikipedia' is a poor name for something just because it happened to be there. 'Rosette', for instance, would be better.
BreamoreBoy commentedon Jun 24, 2014
Confirmed still a problem in 3.4.1 on Win7.
terryjreedy commentedon Jun 24, 2014
bpo-21823 fixed the Terminator issue 3 days ago.
bpo-21597 is about making the text pane resizable.
The doc strings for peace, planet_and_moon, and tree need a bit of re-wrapping. The paint instruction is wrong. I am working on these now.
"Use mouse/keys or Stop" is a generic prompts for all 'special' demos that continue after xyz.main returns. keys is never right for the current set of demos.
The text for two_canvases does not load. I think this can be fixed.
python-dev commentedon Jun 25, 2014
New changeset 129ec3d90a67 by Terry Jan Reedy in branch '2.7':
Issue bpo-14117: Inprove help text and docstrings, some for clarity, some just to
http://hg.python.org/cpython/rev/129ec3d90a67
New changeset 713a774ca68a by Terry Jan Reedy in branch '3.4':
Issue bpo-14117: Inprove help text and docstrings, some for clarity, some just to
http://hg.python.org/cpython/rev/713a774ca68a
terryjreedy commentedon Jun 30, 2014
21884 removed or moved global system-changing or gui calls to main. Wrapping two_canvases code (except for window preserving mainloop) to a new main fixed its problems.
Should remove reload from main driver, and test.
terryjreedy commentedon Jul 23, 2014
Added bpo-21933, change text font size, as dependency.
Added new bpo-22051 remove reload, as dependency.
bpo-18132: stop demo buttons from disappearing, was fixed by bpo-21507 patch.
terryjreedy commentedon Jul 23, 2014
bpo-22053 added main(), eliminated 'while RUN', and fixed this a 3.x debug shutdown message.
The main remaining problem I am aware of now is that some demos 'print' messages to the console (or shell), which would be a problem if there were not one (as with pythonw). Except for one demo, the messages would fit on the demo window message button. A possible fix would be to call demo.main with the button, so mainloop demos could write back to it.
(Normal demo returns are put there now.)
cabiad commentedon Apr 14, 2015
Running through each of the demos, it seems as though only 'penrose' and 'tree' have console/shell output.
'penrose' output is a list of information about the current rendering and has a format like:
Calculation: 0.0009 s
Drawing: 0.0074 s
Together: 0.0083 s
5 kites and 0 darts = 5 pieces.
(... This repeats with updated information for each rendering ...)
I believe that there's too much output right now to include this in the demo window's message button area. It might be interesting to show most or all of this information with a turtle.write() in the graphical area, but I think that the better option is just to remove (or at least comment out) the timing information entirely and show only the '5 kites and 0 darts = 5 pieces' portion in the message button area.
I could submit a patch for either 'penrose' option if there's interest.
The 'tree' prints a count of the number of turtles created at the end of the run. Console output looks like:
1024
I think this is not very useful, except perhaps when debugging the demo. I've attached a patch which removes this output.
willingc commentedon Jun 16, 2018
Hi @terry.reedy,
I'm triaging open "turtle" issues. What do you think would be a reasonable next step for this issue? Perhaps: a contributor runs the demo and reports back here with the current behavior experienced.
terryjreedy commentedon Jun 29, 2018
bpo-21884 was closed as a duplicate of bpo-21882 and hence not a separate dependency.
terryjreedy commentedon Jun 29, 2018
PR 8002 fixes the remaining minor problems.
terryjreedy commentedon Jun 29, 2018
New changeset 891a1f8 by Terry Jan Reedy in branch 'master':
bpo-14117: Make minor tweaks to turtledemo (GH-8002)
891a1f8
miss-islington commentedon Jun 29, 2018
New changeset e2c5a75 by Miss Islington (bot) in branch '3.7':
bpo-14117: Make minor tweaks to turtledemo (GH-8002)
e2c5a75
miss-islington commentedon Jun 29, 2018
New changeset 00e0524 by Miss Islington (bot) in branch '3.6':
bpo-14117: Make minor tweaks to turtledemo (GH-8002)
00e0524
vstinner commentedon Oct 24, 2018
See also bpo-35039 which removed now useless clock() calls from Lib/turtledemo/penrose.py.