diff options
Diffstat (limited to 'lldb/examples/python/cmdtemplate.py')
-rw-r--r-- | lldb/examples/python/cmdtemplate.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lldb/examples/python/cmdtemplate.py b/lldb/examples/python/cmdtemplate.py index 0acb04ef471..97af943e6de 100644 --- a/lldb/examples/python/cmdtemplate.py +++ b/lldb/examples/python/cmdtemplate.py @@ -9,6 +9,8 @@ # (lldb) command script import /path/to/cmdtemplate.py # --------------------------------------------------------------------- +from __future__ import print_function + import inspect import lldb import optparse @@ -124,7 +126,7 @@ class FrameStatCommand: options.inscope) variables_count = variables_list.GetSize() if variables_count == 0: - print >> result, "no variables here" + print("no variables here", file=result) return total_size = 0 for i in range(0, variables_count): @@ -132,9 +134,9 @@ class FrameStatCommand: variable_type = variable.GetType() total_size = total_size + variable_type.GetByteSize() average_size = float(total_size) / variables_count - print >>result, ("Your frame has %d variables. Their total size " - "is %d bytes. The average size is %f bytes") % ( - variables_count, total_size, average_size) + print("Your frame has %d variables. Their total size " + "is %d bytes. The average size is %f bytes" % ( + variables_count, total_size, average_size), file=result) # not returning anything is akin to returning success |