diff options
Diffstat (limited to 'bin/scons-diff.py')
-rw-r--r-- | bin/scons-diff.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bin/scons-diff.py b/bin/scons-diff.py index 52bd51b1..85975011 100644 --- a/bin/scons-diff.py +++ b/bin/scons-diff.py @@ -8,6 +8,7 @@ # etc. so that you can diff trees without having to ignore changes in # version lines. # +from __future__ import print_function import difflib import getopt @@ -43,7 +44,7 @@ def diff_line(left, right): opts = ' ' + ' '.join(diff_options) else: opts = '' - print 'diff%s %s %s' % (opts, left, right) + print('diff%s %s %s' % (opts, left, right)) for o, a in opts: if o in ('-c', '-u'): @@ -51,7 +52,7 @@ for o, a in opts: context = int(a) diff_options.append(o) elif o in ('-h', '--help'): - print Usage + print(Usage) sys.exit(0) elif o in ('-n'): diff_options.append(o) @@ -161,9 +162,9 @@ def diff_file(left, right): else: if text: diff_line(left, right) - print text, + print(text) elif report_same: - print 'Files %s and %s are identical' % (left, right) + print('Files %s and %s are identical' % (left, right)) def diff_dir(left, right): llist = os.listdir(left) @@ -180,9 +181,9 @@ def diff_dir(left, right): os.path.join(right, x), recursive) else: - print 'Only in %s: %s' % (left, x) + print('Only in %s: %s' % (left, x)) else: - print 'Only in %s: %s' % (right, x) + print('Only in %s: %s' % (right, x)) do_diff(left, right, True) |