Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Getting current screen resolution

Reply
Thread Tools

Getting current screen resolution

 
 
Thomas Morton
Guest
Posts: n/a
 
      06-09-2008
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
 
Reply With Quote
 
 
 
 
Miki
Guest
Posts: n/a
 
      06-09-2008
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 <(E-Mail Removed)>
http://pythonwise.blogspot.com
 
Reply With Quote
 
 
 
 
Thomas Morton
Guest
Posts: n/a
 
      06-10-2008

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" <(E-Mail Removed)`>
Sent: Monday, June 09, 2008 11:16 PM
Newsgroups: comp.lang.python
To: <(E-Mail Removed)>
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Screen Resolution in Windows with Ruby Felipe Navas Ruby 2 12-26-2006 06:50 PM
Screen placement based on screen resolution Pat Python 5 04-08-2006 03:10 PM
Get current screen resolution? Carlos Albert ASP .Net 1 01-09-2006 08:50 PM
Getting the screen resolution eagle ASP .Net 1 09-09-2005 06:10 PM
q: current screen resolution =?Utf-8?B?SklNLkgu?= ASP .Net 3 02-07-2005 02:10 AM



Advertisments