homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Turtledemo: exception and minor glitches.
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: 21597 21823 21882 21933 21971 22051 Superseder:
Assigned To: terry.reedy Nosy List: cabiad, miss-islington, python-dev, rhettinger, terry.reedy, vstinner, willingc
Priority: normal Keywords: patch

Created on 2012年02月24日 21:52 by terry.reedy, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
14117_tree_output.patch cabiad, 2015年04月14日 12:17 Removes print in tree demo review
Pull Requests
URL Status Linked Edit
PR 8002 merged terry.reedy, 2018年06月29日 04:34
PR 8003 merged miss-islington, 2018年06月29日 05:11
PR 8004 merged miss-islington, 2018年06月29日 05:12
Messages (15)
msg154164 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2012年02月24日 21:52
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.
Exception in Tkinter callback
Traceback (most recent call last):
 File "C:\Programs\Python32\lib\tkinter\__init__.py", line 1399, in __call__
 return self.func(*args)
 File "C:\Programs\Python32\lib\tkinter\__init__.py", line 487, in callit
 func(*args)
 File "C:\Programs\Python32\lib\turtledemo\clock.py", line 116, in tick
 second_hand.setheading(6*sekunde)
 File "C:\Programs\Python32\lib\turtle.py", line 1936, in setheading
 self._rotate(angle)
 File "C:\Programs\Python32\lib\turtle.py", line 3279, in _rotate
 self._update()
 File "C:\Programs\Python32\lib\turtle.py", line 2660, in _update
 self._update_data()
 File "C:\Programs\Python32\lib\turtle.py", line 2646, in _update_data
 self.screen._incrementudc()
 File "C:\Programs\Python32\lib\turtle.py", line 1285, in _incrementudc
 raise Terminator
turtle.Terminator
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.
msg221482 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014年06月24日 19:24
Confirmed still a problem in 3.4.1 on Win7.
msg221509 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014年06月24日 23:11
#21823 fixed the Terminator issue 3 days ago.
#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.
msg221518 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014年06月25日 02:22
New changeset 129ec3d90a67 by Terry Jan Reedy in branch '2.7':
Issue #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 #14117: Inprove help text and docstrings, some for clarity, some just to
http://hg.python.org/cpython/rev/713a774ca68a 
msg221980 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014年06月30日 20:18
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.
msg223774 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014年07月23日 20:11
Added #21933, change text font size, as dependency.
Added new #22051 remove reload, as dependency.
#18132: stop demo buttons from disappearing, was fixed by #21507 patch.
msg223783 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014年07月23日 21:36
#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.)
msg240876 - (view) Author: Chris Abiad (cabiad) Date: 2015年04月14日 12:17
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.
msg319752 - (view) Author: Carol Willing (willingc) * (Python committer) Date: 2018年06月16日 15:26
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.
msg320696 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018年06月29日 03:52
#21884 was closed as a duplicate of #21882 and hence not a separate dependency.
msg320697 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018年06月29日 04:41
PR 8002 fixes the remaining minor problems.
msg320699 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018年06月29日 05:10
New changeset 891a1f86d415779cf67ca23e626a868e586feb05 by Terry Jan Reedy in branch 'master':
bpo-14117: Make minor tweaks to turtledemo (GH-8002)
https://github.com/python/cpython/commit/891a1f86d415779cf67ca23e626a868e586feb05
msg320701 - (view) Author: miss-islington (miss-islington) Date: 2018年06月29日 05:30
New changeset e2c5a753fa3eabe176c34048e3b68674f99386b0 by Miss Islington (bot) in branch '3.7':
bpo-14117: Make minor tweaks to turtledemo (GH-8002)
https://github.com/python/cpython/commit/e2c5a753fa3eabe176c34048e3b68674f99386b0
msg320702 - (view) Author: miss-islington (miss-islington) Date: 2018年06月29日 05:32
New changeset 00e05242ae650bc29e8052a5fb79cbb83224a657 by Miss Islington (bot) in branch '3.6':
bpo-14117: Make minor tweaks to turtledemo (GH-8002)
https://github.com/python/cpython/commit/00e05242ae650bc29e8052a5fb79cbb83224a657
msg328398 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018年10月24日 22:47
See also bpo-35039 which removed now useless clock() calls from Lib/turtledemo/penrose.py.
History
Date User Action Args
2022年04月11日 14:57:27adminsetgithub: 58325
2018年10月24日 22:47:40vstinnersetnosy: + vstinner
messages: + msg328398
2018年06月29日 05:33:08terry.reedysetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018年06月29日 05:32:19miss-islingtonsetmessages: + msg320702
2018年06月29日 05:30:46miss-islingtonsetnosy: + miss-islington
messages: + msg320701
2018年06月29日 05:12:16miss-islingtonsetpull_requests: + pull_request7611
2018年06月29日 05:11:24miss-islingtonsetstage: commit review -> patch review
pull_requests: + pull_request7610
2018年06月29日 05:10:11terry.reedysetmessages: + msg320699
2018年06月29日 04:41:14terry.reedysetstage: patch review -> commit review
messages: + msg320697
versions: + Python 3.6, Python 3.7, Python 3.8, - Python 2.7, Python 3.4, Python 3.5
2018年06月29日 04:34:56terry.reedysetstage: needs patch -> patch review
pull_requests: + pull_request7609
2018年06月29日 03:52:31terry.reedysetmessages: + msg320696
2018年06月17日 06:37:31BreamoreBoysetnosy: - BreamoreBoy
2018年06月16日 15:26:38willingcsetnosy: + willingc
messages: + msg319752
2015年04月14日 12:17:21cabiadsetfiles: + 14117_tree_output.patch

nosy: + cabiad
messages: + msg240876

keywords: + patch
2014年07月23日 21:36:47terry.reedysetmessages: + msg223783
versions: + Python 2.7
2014年07月23日 20:11:55terry.reedysetdependencies: + Allow the user to change font sizes with the text pane of turtledemo, Turtledemo: stop reloading demos
messages: + msg223774
2014年07月13日 02:19:57terry.reedysetdependencies: + Index and update turtledemo doc.
2014年06月30日 20:18:29terry.reedysetmessages: + msg221980
2014年06月30日 16:30:14terry.reedysetdependencies: + turtledemo modules imported by test___all__ cause side effects or failures
2014年06月25日 02:22:17python-devsetnosy: + python-dev
messages: + msg221518
2014年06月24日 23:11:49terry.reedysetassignee: terry.reedy
stage: needs patch
2014年06月24日 23:11:34terry.reedysetnosy: + rhettinger
dependencies: + Allow turtledemo code pane to get wider., Catch turtle.Terminator exceptions in turtledemo
messages: + msg221509
2014年06月24日 19:24:08BreamoreBoysetnosy: + BreamoreBoy

messages: + msg221482
versions: + Python 3.4, Python 3.5, - Python 3.2, Python 3.3
2012年02月24日 21:52:45terry.reedycreate

AltStyle によって変換されたページ (->オリジナル) /