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

Fernando Pérez fperez528 at
Mon Feb 4 13:18:59 CET 2002

Gerson Kurz wrote:

> On Linux:
> Buy a metric ruler, then construct a lego mindstorm robot to measure
> the screen with that ruler.
> (Sorry folks, couldn't resist, I have nothing against linux, in fact I
> like it :).

Or you can actually do something useful:

[~]> xdpyinfo | grep dimensions
  dimensions:    1400x1050 pixels (474x356 millimeters)


More information about the Python-list mailing list