Get cpu temperature from python? (windows)

128
April 11, 2022, at 2:20 PM

Please. I have tried every google search result and none of them worked. The closest thing I have is this (from this website) that doesn't give me any errors but also doesn't return anything.

import wmi
w = wmi.WMI(namespace="root\OpenHardwareMonitor")
temperature_infos = w.Sensor()
for sensor in temperature_infos:
    if sensor.SensorType==u'Temperature':
        print(sensor.Name)
        print(sensor.Value)

All I need is for this (or anything else) to return my cpu's internal temperature.

Rent Charter Buses Company
READ ALSO
How to go through a Django dictionary in HTML template

How to go through a Django dictionary in HTML template

Im new to Django and I don't really have a clear idea how the Django Template language works but I have a dictionary that is something like this:

107
Python/increase code efficiency about multiple columns filter

Python/increase code efficiency about multiple columns filter

I was wondering if someone could help me find a more efficiency way to run my code

128