我使用wmi
库通过以下代码不断获得30.85°的值。这是我的密码:
import wmi
w = wmi.WMI(namespace=r'root\wmi')
temp = w.MSAcpi_ThermalZoneTemperature()[0].CurrentTemperature
kelvin = temp / 10
celsius = kelvin - 273.15
fahrenheit = (9/5) * celsius + 32
print(f'Kalvin:{kelvin:^10.2f}\tCelsius:{celsius:^10.2f}\tFahrenheit:{fahrenheit:^10.2f}')
结果如下:
Kalvin: 304.00 Celsius: 30.85 Fahrenheit: 87.53
我还想指出,除非我重新启动笔记本电脑,或者等待大约30分钟,否则这个值不会改变
最后,以下是Core Temp 1.15.1中显示的不断变化的结果
你能帮我翻译一下吗
在读取wim documentation和following thread时,我没有得到CPU的当前温度,而是从主板的其他地方得到
相关问题 更多 >
编程相关推荐