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 tracer bugfixes and new functions
Type: Stage:
Components: Tkinter Versions: Python 2.2
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: ababo, gvanrossum
Priority: low Keywords: patch

Created on 2002-08-14 16:24 by ababo, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
turtle.py.diff ababo, 2002-08-14 16:24 Tk turtle patch and update for python/dist/src/Lib/lib-tk/turtle.py
Messages (3)
msg40941 - (view) Author: Attila Babo (ababo) Date: 2002-08-14 16:24
Environment:
Python 2.2.1 on Windows

Bug fixes:
There is no output without tracing, i.e. with tracer(0)
the module not update the canvas. Fixed in _draw_turtle
and circle. Now after tracer(0) the head turns off
immediatly, all drawing functions working as required
without tracer mode. A few duplicates elimineted in
_goto to clean up the code. Cosmetic changes with
adding and removing empty lines.

New functions:
heading(): returns the current heading of the pen
setheading(angle): sets the heading of the pen
position(): returns the current position, later you can
reuse it with goto()
window_width(): returns the width of the window in pixels
window_height(): returns the height of the window in pixels
setx(xpos): moves the pen such that its y-position
remains the same but its x-position is the given value.
The heading of the pen is not changed. If the pen is
currently down,it will draw a line along its path.
sety(ypos): moves the pen such that its x-position
remains the same but its y-position is the given value.
The heading of the pen is not changed. If the pen is
currently down, it will draw a line along its path.

With these changes the turtle module maintains better
funcionality with Logo turtle graphics.
msg40942 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-08-20 20:40
Logged In: YES 
user_id=6380

It's a feature that when tracing is off you don't see
anything drawn -- updating the screen after each line is
drawn is too expensive. If you really want this, please make
it a separate flag.

Regarding the new methods added: can you explain why you
need these?

Finally, please submit a documentation patch. If you don't
know LaTeX, try to emulate what's there in
Doc/lib/libturtle.tex, and we'll fix it for you, but we
won't write the docs for you.
msg40943 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-09-23 16:56
Logged In: YES 
user_id=6380

I've added the new functions to the 2.3 CVS now. Martin has
already fixed the circle bug (reported in 612595). Closing
this patch.
History
Date User Action Args
2022-04-10 16:05:35adminsetgithub: 37032
2002-08-14 16:24:36ababocreate