Python Forum
Display device details i.e connected with more than one device
Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Display device details i.e connected with more than one device
#1
How to get display device details , where the system is connects with more than one display devices like DP, MDP , SDP ,HDMI ..etc
Reply
#2
What OS do you use? What kind of details?
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#3
While I don't know what are the exact details/properties you are looking for, a quick search gave me these results which may help you:

Screen resolution:
http://stackoverflow.com/questions/31293...-in-python

Refresh rate, colour, bits per pixel:
http://stackoverflow.com/questions/12250...fresh-rate
Reply
#4
OS : window
Python 2.7

Looking for device name

Python program that automatically finds and identifies multiple display devices connected to my computer (Windows)
Reply
#5
See this on SO.
Also, I don't if it's there but it is, you may try to take that info from the registry.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#6
I have tried below code

1
2
3
4
5
6
7
import subprocess
import re
 
proc = subprocess.Popen(['powershell', 'Get-WmiObject win32_desktopmonitor;'], stdout=subprocess.PIPE)
res = proc.communicate()
monitors = re.findall('(?s)\r\nName\s+:\s(.*?)\r\n', res[0].decode("utf-8"))
print(monitors)
But getting only one display device detail.Actually system is connected to EDP and VGA.

Moderator Larz60+: Removed formatting and added python tags -- please remember these
Reply
#7
1
2
3
4
5
6
7
import wmi
obj = wmi.WMI().Win32_PnPEntity(ConfigManagerErrorCode=0)
print obj
 
displays = [x for x in obj if 'DISPLAY' in str(x)]
for item in displays:
   print item
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  eth0: [ERROR] Set device name: No such device inkmin 0 580 Oct-03-2024, 12:52 AM
Last Post: inkmin
  scan network and grab details of hosts found robertkwild 5 1,275 Aug-07-2024, 05:21 PM
Last Post: Larz60+
  cheap and low power python device kucingkembar 6 1,443 Jun-27-2024, 12:41 PM
Last Post: kucingkembar
  How to check if Skype call is connected or disconnected in Python? boral 1 1,132 Dec-28-2023, 08:31 AM
Last Post: buran
  Input network device connection info from data file edroche3rd 6 2,611 Oct-12-2023, 02:18 AM
Last Post: edroche3rd
  How to automate loop test check on Network device jpc230 1 1,339 Oct-09-2023, 09:54 PM
Last Post: Larz60+
  Name of USB device on Anodrid frohr 0 1,499 Aug-14-2023, 06:36 AM
Last Post: frohr
  How to display <IPython.core.display.HTML object>? pythopen 3 50,501 May-06-2023, 08:14 AM
Last Post: pramod08728
  When is stdin not connected to a tty, but can still be used interactively? stevendaprano 1 1,941 Sep-24-2022, 05:06 PM
Last Post: Gribouillis
  Help with bleak - how to send test to BLE device? korenron 1 3,127 Aug-28-2022, 11:28 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020