【发布时间】:2013-02-20 18:18:46
【问题描述】:
我正在尝试使用海龟的 python 导入,但出现错误:
Traceback (most recent call last):
File "turtle.py", line 1, in <module>
import turtle
File "/turtle.py", line 32, in <module>
turtle.pensize(2)
AttributeError: 'module' object has no attribute 'pensize'
python是自带turtle还是要单独下载?
我的python是2.7.2
【问题讨论】:
-
你用的是系统python吗?您发布的代码适用于我的 EPD Python 发行版
-
@mbatchkarov 系统 python 是什么意思?我已经在我的 Mac 上安装了它
-
我的意思是你的 mac 附带的那个,但这似乎不相关。查看@DSM 给出的答案
标签: python macos turtle-graphics