Jul-30-2020, 05:59 PM
But be careful, enum34 causes problems in Linux, I don't know how it is in Windows.
print CPU temperature
|
Jul-30-2020, 05:59 PM
But be careful, enum34 causes problems in Linux, I don't know how it is in Windows.
Not working here, at least in Win7. It relies on Powershell or WinAPI instructions which might vary with versions installed.
Added: It does install here on Python3.8. Its just not functional With Powershell5 and its WinApi.
Aug-04-2020, 03:28 PM
(This post was last modified: Aug-04-2020, 03:29 PM by Axel_Erfurt.)
try psutil
import sys import psutil def main(): if not hasattr(psutil, "sensors_temperatures"): sys.exit("platform not supported") temps = psutil.sensors_temperatures() if not temps: sys.exit("can't read any temperature") for name, entries in temps.items(): print(name) for entry in entries: print(" %-20s %s °C (high = %s °C, critical = %s °C)" % ( entry.label or name, entry.current, entry.high, entry.critical)) print() if __name__ == '__main__': main()
|
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Help gathering Temperature from API response | road102 | 5 | 2,181 |
Dec-16-2022, 08:30 PM Last Post: road102 |
|
get data (temperature and humidity) from DHT22 into CSV and sending them over the net | apollo | 0 | 5,085 |
Apr-16-2021, 07:49 PM Last Post: apollo |
|
monitoring the temperature of the CPU with Python | apollo | 2 | 13,907 |
Apr-13-2021, 05:39 PM Last Post: apollo |
|
Show real time temperature and storage with Python | linkxxx | 4 | 3,778 |
Aug-28-2019, 02:06 PM Last Post: linkxxx |
|
Read temperature once | mada72 | 2 | 3,463 |
Apr-28-2019, 07:18 PM Last Post: mada72 |
|
Importing a temperature converting module | RedSkeleton007 | 2 | 9,937 |
Nov-12-2017, 01:20 PM Last Post: sparkz_alot |
|
Temperature Code help? | 20AJ0931 | 2 | 7,392 |
Apr-08-2017, 12:35 AM Last Post: snippsat |
|
Temperature value code | 20AJ0931 | 10 | 15,675 |
Mar-19-2017, 11:05 PM Last Post: 20AJ0931 |