Python——turtle生成图片保存

代码示例如下:

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

posted @ 2018-09-12 13:29  怪猫佐良  阅读(11569)  评论(0编辑  收藏  举报