aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/svg.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/utility/svg.py')
-rw-r--r--wqflask/utility/svg.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/wqflask/utility/svg.py b/wqflask/utility/svg.py
index db13b9d1..6285ea63 100644
--- a/wqflask/utility/svg.py
+++ b/wqflask/utility/svg.py
@@ -102,7 +102,7 @@ if use_dom_implementation<>0:
from xml.dom import implementation
from xml.dom.ext import PrettyPrint
except:
- raise exceptions.ImportError, "PyXML is required for using the dom implementation"
+ raise exceptions.ImportError("PyXML is required for using the dom implementation")
#The implementation is used for the creating the XML document.
#The prettyprint module is used for converting the xml document object to a xml file
@@ -1018,12 +1018,12 @@ class drawing:
PrettyPrint(root,f)
f.close()
except:
- print "Cannot write SVG file: " + filename
+ print(("Cannot write SVG file: " + filename))
def validate(self):
try:
import xml.parsers.xmlproc.xmlval
except:
- raise exceptions.ImportError,'PyXml is required for validating SVG'
+ raise exceptions.ImportError('PyXml is required for validating SVG')
svg=self.toXml()
xv=xml.parsers.xmlproc.xmlval.XMLValidator()
try:
@@ -1031,7 +1031,7 @@ class drawing:
except:
raise Exception("SVG is not well formed, see messages above")
else:
- print "SVG well formed"
+ print("SVG well formed")
if __name__=='__main__':
@@ -1065,4 +1065,4 @@ if __name__=='__main__':
s.addElement(c)
d.setSVG(s)
- print d.toXml()
+ print((d.toXml()))