yml2c
changeset 7 f81a4471bc28
parent 4 e7b49a65cf3a
child 11 7026ccc7a60e
--- a/yml2c	Wed Aug 24 21:22:51 2016 +0200
+++ b/yml2c	Sat Dec 10 10:11:31 2016 +0100
@@ -75,7 +75,7 @@
     result = parse(ymlC, files, True, comment, packrat=True)
 
     if options.parseonly:
-        print result
+        print(result)
     else:
         result = backend.finish(result)
         if options.normalization != "none":
@@ -86,17 +86,17 @@
             outfile.write(codecs.encode(result, options.encoding))
             outfile.close()
         else:
-            print codecs.encode(result, options.encoding)
+            print(codecs.encode(result, options.encoding))
 
 except KeyboardInterrupt:
     w("\n")
     sys.exit(1)
-except KeyError, msg:
+except KeyError as msg:
     w(u"not found: " + u(msg) + u"\n")
     sys.exit(4)
-except LookupError, msg:
+except LookupError as msg:
     w(u"not found: " + u(msg) + u"\n")
     sys.exit(4)
-except Exception, msg:
+except Exception as msg:
     w(msg)
     sys.exit(5)