4

I would like to write a Python program that automatically finds and identifies multiple display devices connected to my computer (Windows). Further I would also like to programmatically start a display session (for example a slide show) in one of those devices. Any ideas how this can be done?

Thank you,

Indranil.

Here are links to some related questions (not the exact question):

  1. How do I get monitor resolution in Python?

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

Community
  • 1
  • 1

1 Answers1

2
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

It gives all connected monitor details.

Nathan Tuggy
  • 2,237
  • 27
  • 30
  • 38