screen size/resolution in win32 in python

Tim Golden mail at timgolden.me.uk
Sun Mar 18 12:24:24 EDT 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
packge:

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

</code>



More information about the Python-list mailing list