--- a/src/reportlab/graphics/samples/runall.py Fri Feb 15 15:54:16 2013 +0000
+++ b/src/reportlab/graphics/samples/runall.py Tue Apr 30 14:20:22 2013 +0100
@@ -7,7 +7,7 @@
import types
def moduleClasses(mod):
- def P(obj, m=mod.__name__, CT=types.ClassType):
+ def P(obj, m=mod.__name__, CT=type):
return (type(obj)==CT and obj.__module__==m)
try:
return inspect.getmembers(mod, P)[0][1]
@@ -27,15 +27,15 @@
f = string.split(fn, '.')[0]
c = getclass(f)
if c != None:
- print c.__name__
+ print(c.__name__)
try:
for fmt in formats:
if fmt:
c().save(formats=[fmt],outDir='.',fnRoot=c.__name__)
if VERBOSE:
- print " %s.%s" % (c.__name__, fmt)
+ print(" %s.%s" % (c.__name__, fmt))
except:
- print " COULDN'T CREATE '%s.%s'!" % (c.__name__, format)
+ print(" COULDN'T CREATE '%s.%s'!" % (c.__name__, format))
if __name__ == "__main__":
if len(sys.argv) == 1:
@@ -43,17 +43,17 @@
else:
try:
if sys.argv[1] == "-h":
- print 'usage: runall.py [FORMAT] [-h]'
- print ' if format is supplied is should be one or more of pdf,gif,eps,png etc'
- print ' if format is missing the following formats are assumed: pdf,pict,png'
- print ' -h prints this message'
+ print('usage: runall.py [FORMAT] [-h]')
+ print(' if format is supplied is should be one or more of pdf,gif,eps,png etc')
+ print(' if format is missing the following formats are assumed: pdf,pict,png')
+ print(' -h prints this message')
else:
t = sys.argv[1:]
for f in t:
run(f)
except:
- print 'usage: runall.py [FORMAT][-h]'
- print ' if format is supplied is should be one or more of pdf,gif,eps,png etc'
- print ' if format is missing the following formats are assumed: pdf,pict,png'
- print ' -h prints this message'
+ print('usage: runall.py [FORMAT][-h]')
+ print(' if format is supplied is should be one or more of pdf,gif,eps,png etc')
+ print(' if format is missing the following formats are assumed: pdf,pict,png')
+ print(' -h prints this message')
raise