diff options
author | Tom Rini <trini@konsulko.com> | 2016-10-12 20:48:43 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-12 20:48:43 -0400 |
commit | 79493609c5300be6cc555ab8bd38971360b381f6 (patch) | |
tree | dff7c18752cbc05974dc5459c0b90879edf8e342 /tools/patman/terminal.py | |
parent | 5ebd27d860ec0c6e36f1b0f973653fe66a7360be (diff) | |
parent | bfeba0173aa45c24bbdba45149716c83258d25f6 (diff) |
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'tools/patman/terminal.py')
-rw-r--r-- | tools/patman/terminal.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/patman/terminal.py b/tools/patman/terminal.py index e78a7c14f5b..137265fc815 100644 --- a/tools/patman/terminal.py +++ b/tools/patman/terminal.py @@ -8,6 +8,8 @@ This module handles terminal interaction including ANSI color codes. """ +from __future__ import print_function + import os import sys @@ -52,9 +54,11 @@ def Print(text='', newline=True, colour=None): if colour: col = Color() text = col.Color(colour, text) - print text, + print(text, end='') if newline: - print + print() + else: + sys.stdout.flush() 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() - print col.Color(line.colour, line.text), + print(col.Color(line.colour, line.text), end='') else: - print line.text, + print(line.text, end='') if line.newline: - print + print() class Color(object): |