代碼示例如下:
from Tkinter import * from turtle import * import turtle forward(100) ts = turtle.getscreen() ts.getcanvas().postscript(file="duck.eps") #.eps文件即postscript腳本
stackoverflow鏈接:https://stackoverflow.com/questions/4071633/python-turtle-module-saving-an-image