Turtle Graphics are incompatible with gmpy

Mensanator mensanator at aol.com
Thu Aug 6 03:31:00 CEST 2009


On Aug 5, 7:49 pm, Gregor Lingl <gregor.li... at aon.at> wrote:
> Mensanator schrieb:
>
> > On Aug 5, 5:31 pm, Mensanator <mensana... at aol.com> wrote:
> >> I fixed this to produce the actual image I'm looking
> >> for instead of that stupid black square. All I did was
> >> use up() & dowm() in place of penup(), pendown() and
> >> replace dot(2) with forward(1).
>
> >> I'll be posting a followup report later.
>
> >http://www.mensanator.com/mensanator/PythonTurtle/turtle.htm
>
> Hi Mansanator,
>
> Thanks for that thorough investigations.
> I hope I'll soon find time to study it in detail.
>
> I've just one idea, but I don't know if you might
> be intersted in it or if it's rewarding at all:

Sure, not tonight, of course, but I can give it try.

>
> What would be the results when using the old turtle
> module with Python 3.1 (it will certainly not run
> out of the box, but perhaps 2to3 might do it?)

I would just need to copy turtle.py to 3.1 Lib (renamed,
of course)?

>
> That would clarify the question if there is some
> impact of new division or some changes in Tkinter.

I had a quick glance through the code. Not too many divisions
and most of them seemd to already be forcing float division
by constructs such as mutiplying by 1.0 (which I assume isn't
strictly neccessary as long as / and // are used correctly.

It seemed a lot of floats were used in the 2.5 code as I saw
such stuff as int(difference), so I really don't know why
.mpz would be a problem since they are integers also and a
Python int ought to be the same thing when coerced to a float
(at least in the range used by Turtle graphics.

>
> Best regards,
> Gregor




More information about the Python-list mailing list