Newbie Q about Turtle Gfx

Neil rubik_wizard at NO.SPAMhotmail.com
Thu Feb 19 05:33:30 EST 2009


Hi

It turns out I should have used

t=turtle.Pen()

and not

t=turtle.pen()

My stupid mistake!

"Neil" <rubik_wizard at NO.SPAMhotmail.com> wrote in message 
news:jYydnb8XE8HPOgHUnZ2dnUVZ8juWnZ2d at bt.com...
> Thanks everyone!
>
> It appears the info in the book is wrong. Trying what you have all 
> suggested
> has got it to work!
>
> Many thanks, and I am sure I will be back here again with other newbie
> problems!
>
> Neil
>
> "Neil" <rubik_wizard at NO.SPAMhotmail.com> wrote in message 
> news:ifidnR_GysdMFQHUnZ2dneKdnZzinZ2d at bt.com...
>> Hello
>>
>> Sorry if this is not an appropriate newsgroup for this problem. I am very 
>> new to Python but not new to programming.
>>
>> I am hoping to use Python to teach a class and have been looking at the 
>> online book 'Snake Wrangling for Kids'.
>>
>> I have followed the example
>>
>>>>>import turtle
>>>>>t=turtle.pen()
>>
>> which works fine and displays a turtle in a window.
>>
>> However whenever I try to use something like
>>
>>>>>t.forward(50)   (taken from the book)
>>
>> i get the error...
>>
>> Traceback (most recent call last):
>>  File "<pyshell#3>", line 1, in <module>
>>    t.forward(50)
>> AttributeError: 'dict' object has no attribute 'forward'
>>
>> I get the same error with t.left(10) etc. etc.
>>
>> I have tried this with V2.6 and V3
>>
>> Any ideas would be much appreciated.
>>
>> Thanks
>> Neil
>>
>>
>>
>
> 





More information about the Python-list mailing list