projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sandbox: Add some test LEDs
[oweals/u-boot.git]
/
tools
/
patman
/
terminal.py
diff --git
a/tools/patman/terminal.py
b/tools/patman/terminal.py
index e78a7c14f5bfd87f9d7344d9c3ada90d1df973b5..137265fc81541ebb77726cce41e17c771fd9126d 100644
(file)
--- a/
tools/patman/terminal.py
+++ b/
tools/patman/terminal.py
@@
-8,6
+8,8
@@
This module handles terminal interaction including ANSI color codes.
"""
This module handles terminal interaction including ANSI color codes.
"""
+from __future__ import print_function
+
import os
import sys
import os
import sys
@@
-52,9
+54,11
@@
def Print(text='', newline=True, colour=None):
if colour:
col = Color()
text = col.Color(colour, text)
if colour:
col = Color()
text = col.Color(colour, text)
- print
text,
+ print
(text, end='')
if newline:
if newline:
- print
+ print()
+ else:
+ sys.stdout.flush()
def SetPrintTestMode():
"""Go into test mode, where all printing is recorded"""
def SetPrintTestMode():
"""Go into test mode, where all printing is recorded"""
@@
-79,11
+83,11
@@
def EchoPrintTestLines():
for line in print_test_list:
if line.colour:
col = Color()
for line in print_test_list:
if line.colour:
col = Color()
- print
col.Color(line.colour, line.text),
+ print
(col.Color(line.colour, line.text), end='')
else:
else:
- print
line.text,
+ print
(line.text, end='')
if line.newline:
if line.newline:
- print
+ print
()
class Color(object):
class Color(object):