Getting User Display Information

Discussion in 'Python' started by Skulled2003@netscape.net, Jun 30, 2004.

  1. Guest

    Hi there,

    I was wondering if it was possible to get the screen display size and other associated properties somehow either using python modules or if possible using Tk methods.

    Thanks a lot.

    Vinod

    __________________________________________________________________
    Switch to the New Netscape Internet Service.
    As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

    Netscape. Just the Net You Need.

    New! Netscape Toolbar for Internet Explorer
    Search from anywhere on the Web and block those annoying pop-ups.
    Download now at http://channels.netscape.com/ns/search/install.jsp
    , Jun 30, 2004
    #1
    1. Advertising

  2. > I was wondering if it was possible to get the screen display size and
    > other associated properties somehow either using python modules or if
    > possible using Tk methods.


    Using Tkinter:

    from Tkinter import Tk
    w=Tk()
    print w.winfo_screenwidth(),w.winfo_screenheight()
    w.destroy()

    There's a plethora of other information available as methods of the Tk
    object (actually any Tkinter widget), including color depth, cursor
    position, window manager type, etc.

    Note that this is actually creating a Tk window; calling its destroy()
    method right after you've finished with it prevents it from appearing on
    screen. Don't do this if you actually are creating a GUI with Tk.
    Christopher T King, Jun 30, 2004
    #2
    1. Advertising

  3. Mark Hertel Guest

    On Wed, 30 Jun 2004 12:10:45 -0400, Christopher T King <> wrote:
    >> I was wondering if it was possible to get the screen display size and
    >> other associated properties somehow either using python modules or if
    >> possible using Tk methods.

    >
    > Using Tkinter:
    >
    > from Tkinter import Tk
    > w=Tk()
    > print w.winfo_screenwidth(),w.winfo_screenheight()
    > w.destroy()
    >
    > There's a plethora of other information available as methods of the Tk
    > object (actually any Tkinter widget), including color depth, cursor
    > position, window manager type, etc.
    >
    > Note that this is actually creating a Tk window; calling its destroy()
    > method right after you've finished with it prevents it from appearing on
    > screen. Don't do this if you actually are creating a GUI with Tk.


    Is there anyway to get the size of the available screen. I have things
    like the status bar across the bottom of the screen (redhat) and I would
    like to size my application so that it doesn't overlap it.


    --Mark
    Mark Hertel, Jun 30, 2004
    #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. z. f.
    Replies:
    0
    Views:
    675
    z. f.
    Feb 3, 2005
  2. subrato
    Replies:
    8
    Views:
    914
    Juan T. Llibre
    Mar 14, 2006
  3. clercmedia
    Replies:
    2
    Views:
    32,279
    clercmedia
    Dec 9, 2005
  4. RAB

    Getting user information...

    RAB, Nov 18, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    296
    Mark Rae [MVP]
    Nov 18, 2007
  5. lerenard001
    Replies:
    0
    Views:
    421
    lerenard001
    Jul 7, 2008
Loading...

Share This Page