screen size/resolution in win32 in python

Tim Golden mail at
Sun Mar 18 17:24:24 CET 2007

adri80386 wrote:
> Hi:
> How I can get the current screen resolution settings (screen.width and
> screen.heigth in pixels) in python.

You want the GetSystemMetrics function from the pywin32

from win32api import GetSystemMetrics
print "width =", GetSystemMetrics (0)
print "height =",GetSystemMetrics (1)


More information about the Python-list mailing list