[Tutor] Fwd: Fwd: : Turtle

Hershel Millman hershel at themillmans.net
Thu Jun 23 19:50:27 EDT 2016


Millman-Family-Admins-iMac-2:~ Hershel$ python
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import turtle
>>> turtle.__file__
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk/turtle.py'
>>> turtle.pendown
<function pendown at 0x10072bcf8>
>>> turtle.pendown()
>>> 

It seemed to work perfectly and do what it was supposed to. Is my problem then with PyCharm?

Thanks.


Begin forwarded message:

> From: Alan Gauld via Tutor <tutor at python.org>
> Date: June 23, 2016 4:44:15 PM MST
> To: tutor at python.org
> Subject: Re: [Tutor] Fwd: : Turtle
> Reply-To: Alan Gauld <alan.gauld at yahoo.co.uk>
> 
> On 23/06/16 22:13, Hershel Millman wrote:
>> What I typed was:
>> 
>> import turtle
>> turtle.pendown()
>> 
>> (And pendown was highlighted in pycharm, indicating that it was not a valid command.)
> 
> Don't use pycharm. We need to eliminate as many variables as possible.
> Start python in a Terminal and just type the commands into the raw
> Python interpreter. Send a paste of the transcript.
> I expect to see something like:
> 
> agauld at ubuntu:~$ python2
> Python 2.7.6 (default, Jun 22 2015, 17:58:13)
> [GCC 4.8.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import turtle
>>>> turtle.__file__
> '/usr/lib/python2.7/lib-tk/turtle.pyc'
>>>> turtle.pendown
> <function pendown at 0x7f804ecd1320>
>>>> turtle.pendown()
>>>> 
> 
> Can you reproduce that on your Mac? (Except maybe with an
> error message somewhere along the line?)
> 
>> /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5 "/Users/Hershel/PycharmProjects/Project 1/practicefornotturtle.py"
>> Traceback (most recent call last):
>>  File "/Users/Hershel/PycharmProjects/Project 1/practicefornotturtle.py", line 2, in <module>
>>    turtle.pendown()
>> AttributeError: 'module' object has no attribute 'pendown'
> 
> I notice that this says you are using Python 2.5 but your
> last message suggested the module was in 2.6.
> 
> I don't think that should make a difference for the turtle
> module but it might be significant... Lets see your
> transcript first.
> 
> -- 
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.amazon.com/author/alan_gauld
> Follow my photo-blog on Flickr at:
> http://www.flickr.com/photos/alangauldphotos
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list