想用python检测并记录是否接入了显示器,该怎么写?
大家讲道理
大家讲道理 2017-04-17 16:27:47
0
1
340

新手,程度就是刚把廖雪峰的python教程看到了线程和进程之前的那部分。因为我感觉该实践点东西了,先不去管性能和任务管理。

需求:

  • 就是记录每天开关显示器的时间

  • 取到数据就行,其他的应该还可以搞定

困难:

  • 网上搜了几天,无果。

  • os模块和wim模块都没有直接的方法能显示出来相关信息。

注:只有一个显示器,所以判断就是看主机上连接的设备有没有显示器这个字段就行了。

比较理想的状态就是获取到一个对象,对这个对象进行循环或者查询,拿到了就说明插入(或者打开)了显示器,否者就是没有。

谢谢大家的帮助!!

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
黄舟

This kind of interaction with the hardware layer without considering other situations is mostly based on the operating system.
In this case, just find the interface corresponding to the operating system.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!