Accessing CPU temperature in python

前端 未结 7 1515
暗喜
暗喜 2020-11-29 04:07

I need an example code for accessing CPU temperature in python.

I\'m running windows 7, BTW.

7条回答
  •  佛祖请我去吃肉
    2020-11-29 04:51

    I have used the utility from https://github.com/BennyCarbajal/PyTherm

    Pretty much install pythonnet with:

    pip install pythonnet
    

    Then just execute the terminal as administrator and finally execute the file:

    python pytherm.py
    

    It also works if you run it as a regular user but will not output as much data.

    Since it returns the data in JSON format, it should be easy for you to just get the data of the specific hardware you are looking for.

提交回复
热议问题