Getting current screen resolution

Discussion in 'Python' started by Thomas Morton, Jun 9, 2008.

  1. This is a "thing" that has been annoying me all morning: and I can't
    work out how to do it.

    I need a way to get the DPI or screen resolution of the monitor that a
    script is currently runnign on.

    I have a way in Windows but it doesnt port to Unix (which is important).

    Any ideas?

    --
    Thomas Morton

    Lead Developer || Founder
    TomNRob Web Services
    www.tomnrob.com
    Thomas Morton, Jun 9, 2008
    #1
    1. Advertising

  2. Thomas Morton

    Miki Guest

    Hello,

    > This is a "thing" that has been annoying me all morning: and I can't
    > work out how to do it.
    >
    > I need a way to get the DPI or screen resolution of the monitor that a
    > script is currently runnign on.
    >
    > I have a way in Windows but it doesnt port to Unix (which is important).
    >
    > Any ideas?

    Maybe one of Tkinter.Tk winfo_* methods?

    HTH,
    --
    Miki <>
    http://pythonwise.blogspot.com
    Miki, Jun 9, 2008
    #2
    1. Advertising

  3. Yeh that's not such an issue - this is for some basic image analysis for a
    document / report. It's not HUGELY important data (it can be wrong with no
    real come back) but it has to be roughly accurate...

    The idea is I have an image and I need to work out how big it displays on
    the monitor of the computer running the script :)

    Thanks for the replies so far ppl :) I think I might have it.......

    Tom
    --------------------------------------------------
    From: "Larry Bates" <`>
    Sent: Monday, June 09, 2008 11:16 PM
    Newsgroups: comp.lang.python
    To: <>
    Subject: Re: Getting current screen resolution

    > Thomas Morton wrote:
    >> This is a "thing" that has been annoying me all morning: and I can't
    >> work out how to do it.
    >>
    >> I need a way to get the DPI or screen resolution of the monitor that a
    >> script is currently runnign on.
    >>
    >> I have a way in Windows but it doesnt port to Unix (which is important).
    >>
    >> Any ideas?
    >>

    >
    > warning - be very careful about trying to come up with something like
    > this.
    > Today it is common for people to have more than one monitor, so you will
    > need to take that into account. Just getting resolution of one monitor
    > might not be enough (but then I don't know EXACTLY what is is that you are
    > doing with the
    > resolution). I see a lot of software that ignores the dual-monitor
    > possibility.
    >
    > -Larry
    > --
    > http://mail.python.org/mailman/listinfo/python-list
    Thomas Morton, Jun 10, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SklNLkgu?=

    q: current screen resolution

    =?Utf-8?B?SklNLkgu?=, Feb 6, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,588
    Ken Cox [Microsoft MVP]
    Feb 7, 2005
  2. eagle

    Getting the screen resolution

    eagle, Sep 9, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,877
    Marina
    Sep 9, 2005
  3. Carlos Albert

    Get current screen resolution?

    Carlos Albert, Jan 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    462
    Henrique Mello
    Jan 9, 2006
  4. Pat
    Replies:
    5
    Views:
    529
  5. Felipe Navas
    Replies:
    3
    Views:
    192
Loading...

Share This Page