X-Git-Url: https://projects.mako.cc/source/yourule/blobdiff_plain/1711747333c7666b644f6124de39c49cd0b26526..e124557994c5c04fb56466d3fb558e640699b919:/svgruler.py diff --git a/svgruler.py b/svgruler.py index 7c66050..21b7a28 100644 --- a/svgruler.py +++ b/svgruler.py @@ -1,5 +1,25 @@ +#!/usr/bin/env python + +# YouRule: Onscreen Ruler Generator +# +# Copyright (C) 2007 Benjamin Mako Hill +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the Affero General Public License as published +# by the Free Software Foundation, either version 1 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the Affero General Public License +# along with this program. If not, see +# . + # define the length of things -from __future__ import division + import SVGdraw class SVGRuler: @@ -57,8 +77,8 @@ class SVGRuler: self.drawing.setSVG(self.svg) def getxml(self): - import cStringIO - xml = cStringIO.StringIO() + import io + xml = io.StringIO() xml.write("\n") xml.write("\n") self.svg.toXml(0,xml)