[Tutor] error in using TurtleWorld modules, ThinkPython.org Book

Peter Otten __peter__ at web.de
Sun Jul 17 11:26:30 CEST 2011


Surya P.K. Kasturi wrote:

> 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

You forgot the parens in

world = TurtleWorld()

and therefore your turtle Bob

> bob = Turtle()
> fd(bob, 100)

has no world to live and move in.




More information about the Tutor mailing list