diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-06-30 12:20:21 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-06-30 12:20:21 +0200 |
commit | 540583ea8cb3fd31478284f3b6bdbdf858674c57 (patch) | |
tree | fa5b0a3d84d1f8215d95eac8c029a7e6074689a4 /scripts/utils.py | |
parent | f78625498b17a164e12bd6a4c839d7e7f74b54a6 (diff) | |
download | qutebrowser-540583ea8cb3fd31478284f3b6bdbdf858674c57.tar.gz qutebrowser-540583ea8cb3fd31478284f3b6bdbdf858674c57.zip |
scripts: Flush title outputs
Hopefully helps with the output on GitHub actions?
Diffstat (limited to 'scripts/utils.py')
-rw-r--r-- | scripts/utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/utils.py b/scripts/utils.py index bdf3f96fc..ce7d8eb75 100644 --- a/scripts/utils.py +++ b/scripts/utils.py @@ -59,14 +59,14 @@ def _esc(code): return '\033[{}m'.format(code) -def print_col(text, color, file=sys.stdout): +def print_col(text, color, file=sys.stdout, flush=False): """Print a colorized text.""" if use_color: fg = _esc(fg_colors[color.lower()]) reset = _esc(fg_colors['reset']) - print(''.join([fg, text, reset]), file=file) + print(''.join([fg, text, reset]), file=file, flush=flush) else: - print(text, file=file) + print(text, file=file, flush=flush) def print_error(text): @@ -77,12 +77,12 @@ def print_title(text): """Print a title.""" print() print_col("==================== {} ====================".format(text), - 'yellow') + 'yellow', flush=True) def print_subtitle(text): """Print a subtitle.""" - print_col("------ {} ------".format(text), 'cyan') + print_col("------ {} ------".format(text), 'cyan', flush=True) def change_cwd(): |