]> git.phdru.name Git - sqlconvert.git/commitdiff
Use print function for Python 3 compatibility
authorOleg Broytman <phd@phdru.name>
Mon, 25 Jul 2016 21:34:50 +0000 (00:34 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 25 Jul 2016 21:34:50 +0000 (00:34 +0300)
scripts/print_subtree.py
tests/run_all.py

index da5eae8c5fbdac1dc48db6a26cc20f5ce686a627..d6c3f743810c601a9b7f796f544fc434f402fb54 100755 (executable)
@@ -1,4 +1,5 @@
 #! /usr/bin/env python
+from __future__ import print_function
 
 import sys
 from sqlparse import parse
@@ -13,12 +14,12 @@ def test():
         "/*! directive*/ INSERT INTO `MyTable` (`Id`, `Name`) "
         "VALUES (1, 'one')"
     ):
-        print "----------"
+        print("----------")
         for parsed in parse(query):
             requote_names(parsed)
             print_tokens(parsed)
             print_subtree(parsed)
-    print "----------"
+    print("----------")
 
 
 def main(query):
index 2e217bf31e814c42286fc7a96912fd53e6c3680b..9503411d70ab58601b89a4d58dcc9afaa517d3e2 100755 (executable)
@@ -1,4 +1,5 @@
 #! /usr/bin/env python
+from __future__ import print_function
 
 
 import os
@@ -31,7 +32,7 @@ def main():
     os.environ["PYTHONPATH"] = os.curdir
 
     for test in sorted(tests):
-        print test
+        print(test)
         subprocess.call((sys.executable, '-m', test))
 
 if __name__ == '__main__':