[Tutor] Ongoing trouble with Turtle's end_fill() - caused by abug in turtle.py

Dick Moores rdmoores at gmail.com
Thu Aug 7 23:44:02 CEST 2008

On Thu, Aug 7, 2008 at 11:26 AM, Alan Gauld <alan.gauld at btinternet.com> wrote:
> "Dick Moores" <rdmoores at gmail.com> wrote
>> 1. The turtle has some behavior I don't see how to eliminate. If you
>> refer to lines 223, 225, 227, 229, etc., you'll see that the turtle
>> always faces in the direction it is moving when drawing a rectangle.
> That is correct behaviour for a turtle!

Yes. I wanted that, and set it accordingly. Those lines refer to the
program using the 2.5 turtle.py.

> Remember turtle graphics are notionally about moving a physical
> drawing device (the turtle) around on the floor or desk. If the turtle
> doesn't turn to face the direction of travel it can't travel that way!
> IMHO that's just a feature of the technology and any other behaviour
> would be out of keeping with the intent.

Actually, if you look at those lines, I had to go to some trouble to
get the turtle to do that!

>> Using the Python2.6 beta2 version of turtle.py, the turtle can be seen
>> at each corner spinning to orient itself to the new direction. I don't
>> want this.
> While far from common in turtle implementations (I have only seen
> it in my old CP/M Logo version) it is a feature that would be true
> of a physical turtle too. Its not really a bug but a "feature" I guess!

I finally found how to make the turtle disappear permanently. In the
new turtle.py, the code is "hideturtle()".

>> 2. The turtle can also be seen moving from the last corner of the last
>> rectangle to the first corner of the next. I don't want this.
> Again true of a physical turtle... But if you set speed to fastest
> does that work? Also in the old turtle moduile there was a way to
> hide the turtles movements completely and just draw the finished
> graphic - which was orders of magnitude faster for complex
> shapes - is that still available in turtle26?

Yes, penup(). <http://docs.python.org/dev/library/turtle.html#turtle.penup>

> One way to hide the turtle would be top change colour to the

Thanks for thinking about it, but with hideturtle() I'm a happy camper.

>> 3. When the screen is cleared between cycles by line 367, the blank
>> screen shows for a second or so. I don't want this.
>> In my program using the old turtle I've had to create
>> colored-backgrounds by drawing a rectangle almost as large as the
>> screen (see my draw_background() beginning at line 365). With the new
>> turtle, the background color can be set by, for example,
>> screen.bgcolor("orange"). But even so, in the V16 I was trying to
>> write, that blank screen still shows for a second or so. With the old
>> turtle, the transition from one "background" to another seems
>> instantaneous. No white blank screen visible at all.

Solved that. I'm pasting the version that uses the new turtle.py.
<http://py77.python.pastebin.com/f657deaaf>. This runs fine, but I'll
be doing more work on it.

> Sounds like a valid complaint that one...

>> 4. I've attempted to make the turtle invisible, but haven't succeeded.

See above.

> Should be possible to set color to bgcolor. but set it back to
> draw the lines or they too will be invisible!
>> I'm guessing that all the problems I've mentioned aren't the result of
>> bugs--rather, I just don't understand the doc.
> Maybe more not understanding(remembering) the origin of turtle graphics.
> It was for kids to understand computer graphics... Seeing the shapes
> being drawn is a big part of that.

Well, I also want to see the rectangles being drawn--by an invisible turtle. ;-)

Actually, I got interested in this because of the colors. I had just
bought my first LCD monitor, a 22-incher. And I wrote the program so
that it prints the color names to the console window. I had been
ignorant about colors--had no idea what magenta, chartreuse,
turquoise, cyan were, just to mention a few.

Thanks, Alan.


More information about the Tutor mailing list