bob gailer schrieb:
roberto wrote:
hello everyone
i have a problem with python 3.0 graphics module:

no problem while importing the module
import turtle

but when i issue any command like:
t = turtle.pen()
t = turtle.forward(60)

Your code fails for me at turtle.pen AttributeError: 'module' object has no attribute 'pen'
Do you use Python 3.0?

>>> import turtle
>>> turtle.pen
<function pen at 0x0179A4F8>
>>>

If I replace pen with Pen then it works as desired.
Then you use the Pen-class to create a Turtle t. Then you
have to call the forward method for this turtle:

>>> import turtle
>>> t = turtle.Pen()
>>> t.forward(60)
>>>

Regards,
Gregor


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to