#!/usr/bin/python from math import * output = " \n" def drawline(x1, y1, x2, y2): global output output += '\n' def draw(): for offset in range(0, 900, 10): drawline(offset, 300, 200+offset, 500) draw() output +='\n' open("simple.svg", "w").write(output)