From b0bf43e6a272d42a55158e657bd937cb82fc3d8d Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sat, 10 Jun 2023 23:02:34 +0300 Subject: move files, rename home package to homekit --- py_include/homekit/inverter/util.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 py_include/homekit/inverter/util.py (limited to 'py_include/homekit/inverter/util.py') diff --git a/py_include/homekit/inverter/util.py b/py_include/homekit/inverter/util.py new file mode 100644 index 0000000..a577e6a --- /dev/null +++ b/py_include/homekit/inverter/util.py @@ -0,0 +1,8 @@ +import re + + +def beautify_table(s): + lines = s.split('\n') + lines = list(map(lambda line: re.sub(r'\s+', ' ', line), lines)) + lines = list(map(lambda line: re.sub(r'(.*?): (.*)', r'\1: \2', line), lines)) + return '\n'.join(lines) -- cgit v1.2.3