diff options
author | Gary Oberbrunner <garyo@oberbrunner.com> | 2013-09-22 17:08:12 (GMT) |
---|---|---|
committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2013-09-22 17:08:12 (GMT) |
commit | 953dc41b8b720fdcec7955de67d23206214e5125 (patch) | |
tree | b95b2144ccf82d8227cec025af152f4eadfa7282 /bin/scons-diff.py | |
parent | 328e541f40849c270fc75f0932594d18d2e6340b (diff) | |
download | SCons-953dc41b8b720fdcec7955de67d23206214e5125.zip SCons-953dc41b8b720fdcec7955de67d23206214e5125.tar.gz SCons-953dc41b8b720fdcec7955de67d23206214e5125.tar.bz2 |
Result of raw 2to3 run (2to3-2.7); checkpoint for python3 conversion.
Diffstat (limited to 'bin/scons-diff.py')
-rw-r--r-- | bin/scons-diff.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/scons-diff.py b/bin/scons-diff.py index 52bd51b..5181fa1 100644 --- a/bin/scons-diff.py +++ b/bin/scons-diff.py @@ -43,7 +43,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 +51,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 +161,9 @@ def diff_file(left, right): else: if text: diff_line(left, right) - print text, + print(text, end=' ') 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) @@ -173,16 +173,16 @@ def diff_dir(left, right): u[l] = 1 for r in rlist: u[r] = 1 - for x in sorted([ x for x in u.keys() if x[-4:] != '.pyc' ]): + for x in sorted([ x for x in list(u.keys()) if x[-4:] != '.pyc' ]): if x in llist: if x in rlist: do_diff(os.path.join(left, x), 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) |