diff options
author | Serge Guelton <sguelton@redhat.com> | 2019-03-21 18:27:40 +0000 |
---|---|---|
committer | Serge Guelton <sguelton@redhat.com> | 2019-03-21 18:27:40 +0000 |
commit | 525cd59f5a12254e80d5f20bf2d9713728a114d4 (patch) | |
tree | bb174d21b449a016712aa1867fdbdff781b34b15 /lldb/examples/customization/bin-utils/binutils.py | |
parent | 05ea3a6be3ba172e8824a8fb66b799b3cc2c72f3 (diff) | |
download | bcm5719-llvm-525cd59f5a12254e80d5f20bf2d9713728a114d4.tar.gz bcm5719-llvm-525cd59f5a12254e80d5f20bf2d9713728a114d4.zip |
Python 2/3 compatibility: from __future__ import print_function
Differential Revision: https://reviews.llvm.org/D59580
llvm-svn: 356695
Diffstat (limited to 'lldb/examples/customization/bin-utils/binutils.py')
-rw-r--r-- | lldb/examples/customization/bin-utils/binutils.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lldb/examples/customization/bin-utils/binutils.py b/lldb/examples/customization/bin-utils/binutils.py index 576dcba02f7..20f5a2e3143 100644 --- a/lldb/examples/customization/bin-utils/binutils.py +++ b/lldb/examples/customization/bin-utils/binutils.py @@ -2,6 +2,7 @@ import StringIO +from __future__ import print_function def binary(n, width=None): """ @@ -77,7 +78,7 @@ def utob(debugger, command_line, result, dict): if width < 0: width = 0 except: - print utob.__doc__ + print(utob.__doc__) return if len(args) > 2: @@ -87,12 +88,12 @@ def utob(debugger, command_line, result, dict): bits = binary(n, width) if not bits: - print "insufficient width value: %d" % width + print("insufficient width value: %d" % width) return if verbose and width > 0: pos = positions(width) - print ' ' + ' '.join(pos) - print ' %s' % str(bits) + print(' ' + ' '.join(pos)) + print(' %s' % str(bits)) def itob(debugger, command_line, result, dict): @@ -107,7 +108,7 @@ def itob(debugger, command_line, result, dict): if width < 0: width = 0 except: - print itob.__doc__ + print(itob.__doc__) return if len(args) > 2: @@ -117,9 +118,9 @@ def itob(debugger, command_line, result, dict): bits = twos_complement(n, width) if not bits: - print "insufficient width value: %d" % width + print("insufficient width value: %d" % width) return if verbose and width > 0: pos = positions(width) - print ' ' + ' '.join(pos) - print ' %s' % str(bits) + print(' ' + ' '.join(pos)) + print(' %s' % str(bits)) |