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.

Title: turtle.write() causes flickering when the tracer is turned off.
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.11, Python 3.10, Python 3.9
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: relent95, terry.reedy
Priority: normal Keywords:

Created on 2022-03-18 09:27 by relent95, last changed 2022-04-11 14:59 by admin.

File name Uploaded Description Edit relent95, 2022-03-18 09:27 A sample script that reproduces the bug.
Messages (3)
msg415475 - (view) Author: Shin-Myoung-Serp (relent95) Date: 2022-03-18 09:27
When implementing an animation with turtle, usually the tracer is turned off via turtle.tracer(0, 0) and turtle.update() is called manually.

When the tracer is off, most of drawing functions skips update() calls on the underlying Canvas. But turtle.write() does not do that.
(See the implementation of TurtleScreenBase._write().)

This causes flickering, as can be seen when you run the attached script. (Press space key to hide/show texts.)
msg415531 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2022-03-19 00:56
On Win10, running 3.11.0a5+ from command line, upper ABC and boxes flicker when strings are displayed.  (When run with from IDLE editor, there is no flicker except sometimes when moving  mouse over or off title bar buttons.)  (3.8 only gets security fixes.)
msg415669 - (view) Author: Shin-Myoung-Serp (relent95) Date: 2022-03-21 07:02
I tested on Ubuntu 20.04 with the following Python versions.

    3.8.2(repository version)
    3.11.0a5(compiled from the official tarball)

Both cases cause flickering.
Date User Action Args
2022-04-11 14:59:57adminsetgithub: 91212
2022-03-21 07:02:30relent95setmessages: + msg415669
2022-03-19 00:56:59terry.reedysetnosy: + terry.reedy

messages: + msg415531
versions: + Python 3.9, Python 3.10, Python 3.11, - Python 3.8
2022-03-18 09:27:33relent95create