472,353 Members | 1,146 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Getting User Display Information

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

Jul 18 '05 #1
2 1579
> 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.

Jul 18 '05 #2
On Wed, 30 Jun 2004 12:10:45 -0400, Christopher T King <sq******@WPI.EDU> 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
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ron Brennan | last post by:
Good morning. I have a page displayed and want to get information from a user using showModalDialog, and then send a request to the server for...
5
by: Thelma Lubkin | last post by:
I have a form/subform with the common one-to-many relationship. The form allows user to display records and move to other records via the selector,...
6
by: Teep | last post by:
Below is my code for dropdownlist that is populated from a SQL table. After a selection from the ddl, a datagrid is suppose to come up pertaining...
3
by: Fredrik Melin | last post by:
Same problem that I had before, diffrent approach.. In my application at order-creation, the user might encounter that the item he is trying to...
6
by: Br | last post by:
Hi everyone, Another newbie-type question, Here's what I'd like to do: 1) Have a user type something into an input-field 2) Transfer that...
2
by: underground | last post by:
Hi, everyone I've been trying to figure out a way for a user to update there information. I'm using sections to identify the specific user..Here is...
3
by: Rahul | last post by:
Hi, Is there a way to get the line numbers to display in the exception when you have published your web site? Thanks Rahul
7
by: Atul | last post by:
Hi Theres a website that books hotels . user enters the information and according to that results are displayed to the user.Let it be website A....
2
by: rustyc | last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-) As I said over there: ... for a little side project...
3
by: ArmageddonAsh | last post by:
I'm trying to make an application that will allow the user to enter data into a flexgrid (that's done) and then save the data from that flexgrid into...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.