0

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?

Ébe Isaac
  • 11,563
  • 17
  • 64
  • 97
andesgame
  • 15
  • 1
  • 2
  • turtle use `tkinter` and `tkinter.Canvas` which can save only `postscript` files (`.ps`, `.eps`). `postscript` can't save animation. – furas Nov 17 '16 at 08:48
  • you can only use external program to save all screen - ie. for Linux [SimpleScreenRecorder](http://www.maartenbaert.be/simplescreenrecorder/) – furas Nov 17 '16 at 08:53
  • If you're using Mac OSX, I've just written up [how to create an animated GIF using just Python turtle and Preview](http://stackoverflow.com/questions/41319971/is-there-a-way-to-save-turtles-drawing-as-a-gif/41353016#41353016) – cdlane Dec 27 '16 at 22:54

0 Answers0