添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
路过的松球  ·  Python 之 ...·  4 天前    · 
豪情万千的双杠  ·  Python ...·  3 天前    · 
活泼的面包  ·  ffmpeg giving Error ...·  1 年前    · 
紧张的绿豆  ·  遇到android.os.BadParcel ...·  2 年前    · 
精明的手套  ·  搭建自己的V ...·  2 年前    · 
import time #获取cpu温度 clr.AddReference(r'D:\temp\OpenHardwareMonitor\OpenHardwareMonitorLib.dll') //你的.dll文件地址 from OpenHardwareMonitor.Hardware import Computer c = Computer() c.CPUEnabled = True # get the Info about CPU c.GPUEnabled = True # get the Info about GPU c.Open() while True: #c.Hardware[0].Update() # 更新传感器数据 for a in range(0, len(c.Hardware[0].Sensors)): if "/temperature" in str(c.Hardware[0].Sensors[a].Identifier): print(f"cpu温度:{c.Hardware[0].Sensors[a].get_Value()}", flush=True) c.Hardware[0].Update() break time.sleep(1) //延迟一秒

要用管理员模式启动pycharm

https: // openhardwaremonitor.org 获取.dll文件