【发布时间】:2018-04-23 21:04:48
【问题描述】:
我已阅读答案here,但仍然无法获得适用于 Python Turtle 的自定义形状。
我的代码在这里:
import turtle
screen = turtle.Screen()
screen.register_shape('car', 'car.gif')
t = turtle.Turtle()
t.shape('car')
我收到了AttributeError: 'str' object has no attribute '_type',但我不知道为什么。根据要求,图片是正版 .gif。
有什么想法吗?
【问题讨论】:
标签: python-3.x turtle-graphics