updated README to note that the project isn't working
[yourule] / svgruler.py
index 7c66050fefac06132b4ab41ea4a371074b27da95..21b7a28d5f9c4ae080ecc4e0b4c20e446c62163c 100644 (file)
@@ -1,5 +1,25 @@
+#!/usr/bin/env python
+
+# YouRule: Onscreen Ruler Generator
+#
+# Copyright (C) 2007 Benjamin Mako Hill <mako@atdot.cc>
+#
+# 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
+# <http://http://www.affero.org/oagpl.html>.
+
 # 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("<?xml version='1.0' encoding='UTF-8'?>\n")
         xml.write("<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www .w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd \">\n")      
         self.svg.toXml(0,xml)

Benjamin Mako Hill || Want to submit a patch?