Turtledemo: exception and minor glitches. #58325
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
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'
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']
The text was updated successfully, but these errors were encountered:
Win7, 3.2.2, python -m turtledemo in Command Prompt Window
After running clock example, hitting Stop results in following:
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.
bpo-21823 fixed the Terminator issue 3 days ago.
bpo-21597 is about making the text pane resizable.
"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.
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.
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:
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:
I think this is not very useful, except perhaps when debugging the demo. I've attached a patch which removes this output.