How to save animated GIF images drawing in Python turtle module?

南楼画角 提交于 2019-12-20 06:37:07

问题


I am new to Python turtle module, I wrote a very easy code, like,

from turtle import *
import turtle
forward(100)
right(90)
forward(200)
circle(10)
ts = turtle.getscreen()
turtle.getcanvas().postscript(file = "duck.eps")

I got a .eps image, it looks well, but what I want is an animated image in .gif. However, when I try to say,

turtle.getcanvas().postscript(file = "duck.gif")

I got the duck.gif, but I cannot open it !!

What should I do now?

来源:https://stackoverflow.com/questions/40650099/how-to-save-animated-gif-images-drawing-in-python-turtle-module

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!