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: Turtle speed() function has no effect under Mac OS X
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.1, Python 3.2, Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: belopolsky, david.kwast, delroth, gpolo, gregorlingl, riq, willingc
Priority: normal Keywords:

Created on 2008-06-08 11:06 by delroth, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
speedy.py david.kwast, 2008-06-21 18:05 script to test turtle speed in python 2.5, 2.6 and 3.0
speed_test.py belopolsky, 2010-10-19 15:41
Messages (7)
msg67831 - (view) Author: Pierre Bourdon (delroth) Date: 2008-06-08 11:06
When using the speed() function of the turtle module under Mac OS X, 
it has no effect : the turtle always draws lines with the same speed.

An easy fix is to replace line 553 of the turtle.py file 
by "sleep(self._delay / 1000.0)", however I don't know if it is the 
best solution.
msg68498 - (view) Author: Ricardo Quesada (riq) Date: 2008-06-21 15:03
turtle.py was replaced by a new module in r63929 .
I can't reproduce this bug with this revision, so it seems to be fixed.
using: os/x 10.5.3 intel.
msg68527 - (view) Author: David Kwast (david.kwast) Date: 2008-06-21 18:05
I wrote a small python program to test turtle speed in OSX. I tested
with trunk and py3k branch.

The string input works differently with 2.5, 2.6 and 3.0. The turtle is
slower in 2.5 and almost the same speed in 2.6 and 3.0.

Here are my test results:

david-kwasts-macbook:turtle davidkwast$ ../python_3k/python speedy.py 
0:00:04.640639
0:00:02.031436
david-kwasts-macbook:turtle davidkwast$ ../python_trunk/python speedy.py 
0:00:04.598181
0:00:02.048452
david-kwasts-macbook:turtle davidkwast$ python speedy.py 
(Python version < 2.6 don't support int in speed funtion)
0:00:18.343453
msg89574 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2009-06-21 19:05
Although turtle.py lives inside the tkinter package, this doesn't seem
to be related to tkinter at all. I've set the "no selection" option for
the Components now.
msg119140 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-10-19 15:41
I am attaching a simpler and hopefully more revealing test, speed_test.py.  This test repeatedly draws a full circle at various speeds and prints the time spent.  Here is the result:

# python3.1 speed_test.py
         0: 0.03
         1: 6.61
         2: 4.32
         3: 3.78
         4: 3.23
         5: 3.21
         6: 2.65
         7: 2.72
         8: 2.66
         9: 2.86
        10: 2.67

Note that time decreases as speed changes from 1 to 4 as expected, but then changes unpredictably as speed changes from 5 to 10.
msg119168 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-10-19 21:17
I am attaching another test that demonstrates that the speed of the turtle is different when it draws a straight line and a circle.

The output shows the time it takes to draw a line and a circle of the same length at various speed settings.

$ python3 speed_test2.py
         0: 0.01 0.02
         1: 0.96 2.25
         2: 0.67 2.24
         3: 0.32 1.81
         4: 0.25 1.39
         5: 0.27 1.89
         6: 0.15 1.44
         7: 0.12 1.53
         8: 0.10 1.69
         9: 0.10 1.73
        10: 0.08 1.64
msg294669 - (view) Author: Carol Willing (willingc) * (Python committer) Date: 2017-05-29 04:52
Turtle speed() functions appropriately on current MacOS 10.12.4. Both Python 3.1 and 3.2 have reached End of Life. Issue closed as out of date.
History
Date User Action Args
2022-04-11 14:56:35adminsetgithub: 47312
2017-05-29 04:52:36willingcsetstatus: open -> closed

nosy: + willingc
messages: + msg294669

resolution: out of date
stage: needs patch -> resolved
2010-10-19 21:17:08belopolskysetmessages: + msg119168
2010-10-19 15:43:23belopolskysetnosy: + gregorlingl
2010-10-19 15:41:41belopolskysetfiles: + speed_test.py
nosy: + belopolsky
messages: + msg119140

2010-08-03 21:14:02terry.reedysetnosy: gpolo, david.kwast, delroth, riq
stage: needs patch
components: + Library (Lib)
versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6, Python 2.5, Python 3.0
2009-06-21 19:05:30gpolosetnosy: + gpolo
messages: + msg89574
components: - Tkinter
2008-06-21 18:05:47david.kwastsetfiles: + speedy.py
nosy: + david.kwast
messages: + msg68527
versions: + Python 2.6, Python 3.0
2008-06-21 15:03:03riqsetnosy: + riq
messages: + msg68498
2008-06-08 11:06:53delrothcreate