Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 21st, 2013, 09:53 AM
owenj owenj is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 1 owenj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 27 sec
Reputation Power: 0
Unable to get the Python turtle to work

I am very new to Python and i am working through Python for kids just published.
I am running windows 8 and when i type in to Python shell to activate the Turtle window it appears behind the python shell window which displays the following message.
"Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import turtle
>>> t=turtle.pen()
>>> t.forward(50)
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
t.forward(50)
AttributeError: 'dict' object has no attribute 'forward'
>>>

Reply With Quote
  #2  
Old February 2nd, 2013, 06:16 PM
cgalliher cgalliher is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 1 cgalliher User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 23 sec
Reputation Power: 0
Probable solution

I think this is what they meant to print:

>>> import turtle
>>> turtle.pen()
>>> t = turtle
>>> t.forward(50)

I have the same book and the problem appears on the web as early as 2009.
I contacted the authors and am waiting to find out what they really meant.

Reply With Quote
  #3  
Old February 7th, 2013, 04:56 AM
oblacker oblacker is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 1 oblacker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 40 m
Reputation Power: 0
Hi

You've probably worked it out by now but
>>> t=turtle.pen() should have upper case P as follows
>>> t=turtle.Pen()

Cheers

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > Unable to get the Python turtle to work

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap