help:problem using the RawPen class/turtle module.
Guido van Rossum
guido at python.org
Sun Apr 7 21:46:18 EDT 2002
Somebody wrote:
>
> > I think I've found the problem,
> > it seems that the call to
> >
> > ...
> > self._arrow = _canvas.create_line(x-dx,y+dy,x,y,
> > width=self._width,
> > arrow="last",
> > capstyle="round",
> > fill=self._color)
> >
> > ...
> >
> > in the turtle.py ( _draw_turtle() method)
> > doesn't work because the _canvas to refer to is
> > the one in the 'self' instance,
> > so with the following change:
> >
> > self._arrow = self._canvas.create_line(x-dx,y+dy,x,y,....
> > ^^^^^
> >
> > everything is ok.
> >
> > Without it the _canvas refers to a global that it
> > isn't been initialized to a Canvas when there is a
> > call to the RawPen class.
>
Lee Harr wrote:
>
> Nice work.
>
> In the version I have, that line does not exist, but all of
> the calls to things like _canvas_create_*
> are called as self._canvas_create_*
> so you may have uncovered a bug.
>
> I think the turtle module is not really used very much,
> though I think it is pretty cool.
>
> Please file a bug report!
No need, this was already filed (python.org/sf/536117) and will be fixed
both in 2.2.1 and in 2.3 when it comes out.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-list
mailing list