From e80a63ee51964007fafde12d0d27e85ea764856c Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 2 Oct 2019 22:25:54 -0700 Subject: [PATCH] Added show_data() --- scripts/wk/std.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/wk/std.py b/scripts/wk/std.py index a2b16659..77b1ceab 100644 --- a/scripts/wk/std.py +++ b/scripts/wk/std.py @@ -877,6 +877,15 @@ def set_title(title): print_error('Setting the title is only supported under Windows.') +def show_data(message, data, color=None): + """Display info using standard WIDTH and INDENT.""" + colors = (None, color if color else None) + print_colored( + (f'{" "*INDENT}{message:<{WIDTH}}', data), + colors, + ) + + def sleep(seconds=2): """Simple wrapper for time.sleep.""" time.sleep(seconds)