[New-bugs-announce] [issue7420] turtle - turtle.update() doesn't override turtle.tracer()

"Dragon" Dave McKee report at bugs.python.org
Tue Dec 1 18:52:14 CET 2009


New submission from "Dragon" Dave McKee <dave.mckee at gmail.com>:

Problem:
Using the following code gives different behaviour on versions 2.6.4 and
3.0.1: nothing will be drawn under 3.0.1, but turtle.update() will force
the line to be drawn under 2.6.4. 2.6.4's behaviour is compatible with
the documentation: "turtle.update() - Perform a TurtleScreen update. To
be used when tracer is turned off."

import turtle
from time import sleep
turtle.tracer(100,0) # update screen after 100 drawings
turtle.fd(100)
turtle.update() # force update
sleep(100) # so you can see what's on the screen.

workaround:
use turtle.tracer(1) after drawing instead of turtle.update()

----------
components: Extension Modules
messages: 95868
nosy: dragon
severity: normal
status: open
title: turtle - turtle.update() doesn't override turtle.tracer()
type: behavior
versions: Python 3.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7420>
_______________________________________


More information about the New-bugs-announce mailing list