tests/test_pdfgen_pycanvas.py
branchpy33
changeset 3721 0c93dd8ff567
parent 3617 ae5744e97c42
child 3794 398ea04239b5
--- a/tests/test_pdfgen_pycanvas.py	Fri Feb 15 15:54:16 2013 +0000
+++ b/tests/test_pdfgen_pycanvas.py	Tue Apr 30 14:20:22 2013 +0100
@@ -136,7 +136,7 @@
         self.namespace = {'canvas':canvas,'cm': cm,'inch':inch}
         canvas.translate(x+9, y - height + 9)
         codeObj = compile(self.code, '<sample>','exec')
-        exec codeObj in self.namespace
+        exec(codeObj, self.namespace)
 
         canvas.restoreState()
 
@@ -747,7 +747,7 @@
     open(outputfile("test_pdfgen_pycanvas_out.txt"),"w").write(source)
     import reportlab.rl_config
     if reportlab.rl_config.verbose:
-        print source
+        print(source)
 
 
 def pageShapes(c):
@@ -764,7 +764,7 @@
     d = DocBlock()
     d.comment1 = 'Lesson one'
     d.code = "canvas.textOut('hello, world')"
-    print d.code
+    print(d.code)
 
     d.comment2 = 'Lesson two'