summaryrefslogtreecommitdiffstats
path: root/lldb/test/functionalities/command_script/welcome.py
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-10-23 17:04:29 +0000
committerZachary Turner <zturner@google.com>2015-10-23 17:04:29 +0000
commit35d017f0fc38b53e31f1a44d07c3c142f5d3620b (patch)
tree9bb8d7e92d30ed6ea5387993d53a07e8f16a155c /lldb/test/functionalities/command_script/welcome.py
parentd43fe0bd39ab70b739123853ebd0c2991512b9d7 (diff)
downloadbcm5719-llvm-35d017f0fc38b53e31f1a44d07c3c142f5d3620b.tar.gz
bcm5719-llvm-35d017f0fc38b53e31f1a44d07c3c142f5d3620b.zip
Add from __future__ import print_function everywhere.
Apparently there were tons of instances I missed last time, I guess I accidentally ran 2to3 non-recursively. This should be every occurrence of a print statement fixed to use a print function as well as from __future__ import print_function being added to every file. After this patch print statements will stop working everywhere in the test suite, and the print function should be used instead. llvm-svn: 251121
Diffstat (limited to 'lldb/test/functionalities/command_script/welcome.py')
-rw-r--r--lldb/test/functionalities/command_script/welcome.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/lldb/test/functionalities/command_script/welcome.py b/lldb/test/functionalities/command_script/welcome.py
index c6d4ddcfd40..5dbf09fbbec 100644
--- a/lldb/test/functionalities/command_script/welcome.py
+++ b/lldb/test/functionalities/command_script/welcome.py
@@ -1,3 +1,4 @@
+from __future__ import print_function
import lldb, sys
class WelcomeCommand(object):
@@ -8,7 +9,7 @@ class WelcomeCommand(object):
return "Just a docstring for welcome_impl\nA command that says hello to LLDB users"
def __call__(self, debugger, args, exe_ctx, result):
- print >>result, ('Hello ' + args + ', welcome to LLDB');
+ print('Hello ' + args + ', welcome to LLDB', file=result);
return None;
class TargetnameCommand(object):
@@ -18,7 +19,7 @@ class TargetnameCommand(object):
def __call__(self, debugger, args, exe_ctx, result):
target = debugger.GetSelectedTarget()
file = target.GetExecutable()
- print >>result, ('Current target ' + file.GetFilename())
+ print('Current target ' + file.GetFilename(), file=result)
if args == 'fail':
result.SetError('a test for error in command')
@@ -27,19 +28,19 @@ class TargetnameCommand(object):
def print_wait_impl(debugger, args, result, dict):
result.SetImmediateOutputFile(sys.stdout)
- print >>result, ('Trying to do long task..')
+ print('Trying to do long task..', file=result)
import time
time.sleep(1)
- print >>result, ('Still doing long task..')
+ print('Still doing long task..', file=result)
time.sleep(1)
- print >>result, ('Done; if you saw the delays I am doing OK')
+ print('Done; if you saw the delays I am doing OK', file=result)
def check_for_synchro(debugger, args, result, dict):
if debugger.GetAsync() == True:
- print >>result, ('I am running async')
+ print('I am running async', file=result)
if debugger.GetAsync() == False:
- print >>result, ('I am running sync')
+ print('I am running sync', file=result)
def takes_exe_ctx(debugger, args, exe_ctx, result, dict):
- print >>result, str(exe_ctx.GetTarget())
+ print(str(exe_ctx.GetTarget()), file=result)
OpenPOWER on IntegriCloud