Tuesday, May 12, 2009

Getting Screen resolutions in python

from win32api import GetSystemMetrics
width = GetSystemMetrics (0)
height = GetSystemMetrics (1)
print "Screen resolution = %dx%d" % (width, height)

Requires the python COM module(http://sourceforge.net/projects/pywin32/).

No comments:

Followers