I am using Think Python book, <www.ThinkPython.org> to learn python.
There is a module TurtleWorld that they described to draw lines <
http://www.greenteapress.com/thinkpython/swampy/install.html>
Though I could run the below code in the python shell, I couldn't do it
through a script file.
This is the script :
from TurtleWorld import *
world = TurtleWorld
bob = Turtle()
print bob
fd(bob, 100)
lt(bob)
fd(bob, 100)
lt(bob)
fd(bob, 100)
lt(bob)
fd(bob, 100)
wait_for_user()
*This is the following error I got at terminal :*
<TurtleWorld.Turtle object at 0xb770a50c>
Traceback (most recent call last):
File "turtle.py", line 7, in <module>
fd(bob, 100)
File "/usr/local/lib/python2.6/dist-packages/TurtleWorld.py", line 187, in
fd
self.world.canvas.line([p1, p2], fill=self.pen_color)
AttributeError: 'NoneType' object has no attribute 'canvas'
*Could you help me to fix this error, please!*
*
*
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor