mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 04:41:10 +00:00
main -> prettyprint
This commit is contained in:
parent
806cf0a953
commit
0184a47345
1 changed files with 0 additions and 0 deletions
15
prettyprint.py
Normal file
15
prettyprint.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from sensors import Sensors
|
||||
from colorama import Fore, Style, Back
|
||||
|
||||
|
||||
def pretty_print():
|
||||
s = Sensors.get_temperatures()
|
||||
|
||||
for k, v in s.items():
|
||||
print(f"{Back.CYAN}{k}{Style.RESET_ALL}")
|
||||
|
||||
for sensors in v:
|
||||
print(f"{sensors.sensor_label}: {sensors.current_temp}°C")
|
||||
|
||||
if __name__ == "__main__":
|
||||
pretty_print()
|
||||
Loading…
Add table
Add a link
Reference in a new issue