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

G. Willoughby sab at NOSPAM.freeuk.com
Mon Feb 4 18:04:34 EST 2002


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

G. Willoughby

"Jakob Borg" <jakob at borg.pp.se> wrote in message
news:1965188.y9P21nC1DU at borg.pp.se...
> Gerson Kurz wrote:
>
> > On Linux:
> >
> > Buy a metric ruler, then construct a lego mindstorm robot to measure
> > the screen with that ruler.
>
> Or, perhaps simpler, get the output of xdpyinfo and do a regexp on it to
> extract the 'dimensions:' field for screen #0.
>
> Then there is also the question about _why_ you want to know the sceen
> dimensions - my guess is that it is probably to solve the wrong kind of
> problem...
>
> --
> Jakob Borg





More information about the Python-list mailing list