how can i get the screen width and height in pixels?

Fredrik Lundh fredrik at pythonware.com
Tue Feb 5 02:47:55 EST 2002


G. Willoughby wrote:

> I'm centering a Tkinter app in any given monitor res.  :)

should have mentioned that in your first post...

in Tkinter, for any widget "w" on any platform, do:

    width = w.winfo_screenwidth()
    height = w.winfo_screenheight()

</F>





More information about the Python-list mailing list