Dick Moores wrote: >> Turtle module uses Tk canvas element to draw graphics ('_canvas' >> attribute). I've written module, that exports canvas graphics to SVG >> file: http://wmula.republika.pl/proj/canvas2svg/ -- it may be useful >> for you. > > I afraid I'm totally unfamiliar with SVG. Would it be possible for you > or someone else on the list to show how to use your module to export the > simple product of this simple script to an SVG file? > > =============================================== > import turtle as T import canvasvg > from random import randint > T.setup(width=1000, height=700, startx=0, starty=0) > T.color(1, .5, .5) > T.begin_fill() > # 2 connected lines will fill as a triangle > for x in range(2): > coord = (randint(-500,500), randint(-350,350)) > T.goto(coord) > T.end_fill()
canvasvg.saveall("image.svg", T._canvas) > T.done() > ================================================ w. -- http://mail.python.org/mailman/listinfo/python-list