V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
jun4rui
V2EX  ›  Python

Python 如何获得 Windows 下的 GPU、CPU 传感器信息,然后显示在 Windows 的提示栏?

  •  
  •   jun4rui · 2015-04-11 12:42:49 +08:00 · 7817 次点击
    这是一个创建于 3274 天前的主题,其中的信息可能已经有所发展或是发生改变。

    夏天来了,机器偶尔总有点不利索了,想做一个小的监控程序自己用用。什么鲁大师之类的都不太好用,顺便学习一下Python在Windows下的API之类的

    10 条回复    2015-04-11 22:24:11 +08:00
    sandtears
        1
    sandtears  
       2015-04-11 12:56:42 +08:00
    Python 没把这些东西封装进标准库吧。。
    直接用 ctype 调用 Win32 API 的 dll 来做呗
    geeklian
        2
    geeklian  
       2015-04-11 13:37:00 +08:00 via iPhone
    调用wmi可以取到数据,但各种传感器,输出的数据都不是标准的...
    所以靠谱的方法是用gpu-z一类软件提供的api
    zhizhuo
        3
    zhizhuo  
       2015-04-11 13:39:16 +08:00
    跑下题,mac下有Today Script 可以在通知中心用脚本显示状态.
    教程. http://www.makeuseof.com/tag/replace-geektool-entirely-yosemites-notification-center/
    Github https://github.com/SamRothCA/Today-Scripts
    yksoft1
        4
    yksoft1  
       2015-04-11 13:55:00 +08:00
    感觉要写驱动
    vansje
        5
    vansje  
       2015-04-11 13:59:14 +08:00   ❤️ 1
    vansje
        6
    vansje  
       2015-04-11 14:02:40 +08:00   ❤️ 1
    orzfly
        7
    orzfly  
       2015-04-11 15:41:26 +08:00
    http://openhardwaremonitor.org/ 这个东西可以打开内置的 Web 服务器,然后你可以用 Python 抓他网页拿数据。
    dofine
        8
    dofine  
       2015-04-11 15:45:05 +08:00
    @zhizhuo 这个会不稳定唉,而且貌似获取不到温度,温度需要结合其它的付费软件。。
    askfermi
        9
    askfermi  
       2015-04-11 22:00:32 +08:00
    可以用psutil?
    geeklian
        10
    geeklian  
       2015-04-11 22:24:11 +08:00   ❤️ 1
    命令行输入
    wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature /value

    popen也好,commands也好,就随便咯。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3233 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 14:19 · PVG 22:19 · LAX 07:19 · JFK 10:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.