Returns information about the current display settings on a computer.

This script was tested using Python 2.2.2-224 for Microsoft Windows, available from ActiveState.

Python
Edit|Remove
import win32com.client
strComputer = "."
objWMIService = win32com.client.Dispatch("WbemScripting.SWbemLocator")
objSWbemServices = objWMIService.ConnectServer(strComputer,"root\cimv2")
colItems = objSWbemServices.ExecQuery("Select * from Win32_DisplayConfiguration")
for objItem in colItems:
    print "Bits Per Pel: ", objItem.BitsPerPel
    print "Caption: ", objItem.Caption
    print "Description: ", objItem.Description
    print "Device Name: ", objItem.DeviceName
    print "Display Flags: ", objItem.DisplayFlags
    print "Display Frequency: ", objItem.DisplayFrequency
    print "Dither Type: ", objItem.DitherType
    print "Driver Version: ", objItem.DriverVersion
    print "ICM Intent: ", objItem.ICMIntent
    print "ICM Method: ", objItem.ICMMethod
    print "Log Pixels: ", objItem.LogPixels
    print "Pels Height: ", objItem.PelsHeight
    print "Pels Width: ", objItem.PelsWidth
    print "Setting ID: ", objItem.SettingID
    print "Specification Version: ", objItem.SpecificationVersion