【问题标题】:Find and identify multiple display devices (monitors) using Python使用 Python 查找和识别多个显示设备(显示器)
【发布时间】:2014-03-24 21:32:08
【问题描述】:

我想编写一个 Python 程序,它可以自动查找和识别连接到我的计算机 (Windows) 的多个显示设备。此外,我还想以编程方式在其中一个设备中启动显示会话(例如幻灯片放映)。任何想法如何做到这一点?

谢谢,

吲哚酚。

这里是一些相关问题的链接(不是确切的问题):

  1. How do I get monitor resolution in Python?

  2. How to query NATIVE hardware resolution of primary monitor in Windows?

【问题讨论】:

    标签: python windows screen monitor multiple-monitors


    【解决方案1】:
    import wmi
    obj = wmi.WMI().Win32_PnPEntity(ConfigManagerErrorCode=0)
    
    displays = [x for x in obj if 'DISPLAY' in str(x)]
    
    for item in displays:
       print item
    

    它提供所有连接的监视器详细信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-06
      • 1970-01-01
      • 2012-04-18
      • 2013-04-27
      • 2019-12-26
      • 2023-04-03
      相关资源
      最近更新 更多