Added show_data()
This commit is contained in:
parent
a2017fa415
commit
e80a63ee51
1 changed files with 9 additions and 0 deletions
|
|
@ -877,6 +877,15 @@ def set_title(title):
|
||||||
print_error('Setting the title is only supported under Windows.')
|
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):
|
def sleep(seconds=2):
|
||||||
"""Simple wrapper for time.sleep."""
|
"""Simple wrapper for time.sleep."""
|
||||||
time.sleep(seconds)
|
time.sleep(seconds)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue