Message64388
I have xturtle 0.95a0 running under Python 3.0. Mostly the 2to3 program
just worked for everything except in three places:
1. in __forward methods I had to change:
fromClass.__dict__[method] = d[method] to
setattr(fromClass,method,d[method])
2. in getmethparlist The line:
if type(ob)==types.MethodType: does not evaluate to true even when ob
is a method. In 3.0 it seems that ob always evaluates to a function.
3. in the _pointlist method I changed
cl = self.cv.coords(item) to
cl = list(self.cv.coords(item))
There is probably a more elegant way to use the results from the coords
call than converting to a list, but I'm confused.
The canvas coords function now returns an itertools.imap object. This
confuses me because the documentation on python.org does not mention the
imap function in the itertools module documentation. So I'm not sure if
imap is going away or is just missing documentation.
I would like to propose two additional features that I have added to my
copy of xturtle and have used extensively in my classes:
1. exitOnClick() --- This function simply hides the call to mainloop()
from beginners. It makes life much easier for beginning programers to
run xturtle from IDLE.
2. setWorldCoordinates(llx,lly,ulx,uly) This maps a given set of real
world coordinates to window coordinates and allows programmers to run
the turtle using real world coordinates. Again for beginning
programmers this makes it easy for them to use the turtle to graph
functions, make bar charts, etc. without needing to scale everything
themselves. |
|
Date |
User |
Action |
Args |
2008-03-24 01:21:05 | bmiller | set | spambayes_score: 0.00238632 -> 0.0023863204 recipients:
+ bmiller, gvanrossum, loewis, glingl, gregorlingl |
2008-03-24 01:21:04 | bmiller | set | spambayes_score: 0.00238632 -> 0.00238632 messageid: <1206321664.79.0.692947037423.issue1513695@psf.upfronthosting.co.za> |
2008-03-24 01:21:03 | bmiller | link | issue1513695 messages |
2008-03-24 01:21:01 | bmiller | create | |
|