mirror of
https://github.com/kittywitch/konawall-py.git
synced 2026-02-09 12:29:19 -08:00
Initial commit, win32 and darwin support only
This commit is contained in:
commit
40df439299
14 changed files with 527 additions and 0 deletions
12
custom_print.py
Normal file
12
custom_print.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import termcolor
|
||||
|
||||
"""
|
||||
Print a key-value pair with a key and value coloured differently.
|
||||
|
||||
:param key: The key to print
|
||||
:param value: The value to print
|
||||
:param newline: Whether to print a newline after the value
|
||||
:returns: None
|
||||
"""
|
||||
def kv_print(key: str, value: str, newline: bool = False) -> None:
|
||||
print(termcolor.colored(key, "cyan") + ": " + termcolor.colored(value, "white"), end="\n" if newline else " ")
|
||||
Loading…
Add table
Add a link
Reference in a new issue