Re: [Tutor] Tutor Digest, Vol 34, Issue 7

2006-12-04 Thread Lazarus billa
screen size using a > standard API of Tkinter? > > And also any function to position the window in the > center of the screen..?? > > Thanks in anticipation. > > Regards, > > Asrarahmed Kadri > > -- > To HIM you shall return. > -- next part

Re: [Tutor] Getting the screen size....using Tkinter

2006-12-04 Thread Michael Lange
On Mon, 4 Dec 2006 16:43:42 + "Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote: > Hi folks, > > Is it possible to get the screen size using a standard API of Tkinter? > > And also any function to position the window in the center of the screen..?? > > Thanks in anticipation. > You might want

Re: [Tutor] Why is startfile unavailable on my mac?

2006-12-04 Thread John Fouhy
On 05/12/06, Kent Johnson <[EMAIL PROTECTED]> wrote: > The docs for os.startfile() say it is available on Windows only. Hmm, well you could do a basic Mac version of startfile like this: def startfile(fn): os.system('open %s' % fn) -- John. ___ Tu

[Tutor] clicking a javascript link in a browser

2006-12-04 Thread Nathan Cain
There is a link on a pop-up window from a page that I opened with webbrowser.open() the link is: javascript:Events.clearList(); is there a way for python to "click that link"? Thank you. *** Nathan Cain http://www.Web-Magnets.com Refrigerator Magnets

[Tutor] difflib.SequenceMatcher with get_matching_blocks is incorrect

2006-12-04 Thread Thomas
I'm trying to write a program to test someone's typing speed and show them their mistakes. However I'm getting weird results when looking for the differences in longer (than 100 chars) strings: import difflib # a tape measure string (just makes it easier to locate a given index) a = '1-3-5-7-9-1

Re: [Tutor] Getting the screen size....using Tkinter

2006-12-04 Thread Feise, David
Try this: >>> from Tkinter import * >>> root = Tk() >>> root.winfo_screenwidth() 1280 >>> root.winfo_screenheight() 1024 >>> -Dave From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Asrarahmed Kadri Sent: Monday, December 04, 2006 8:44 AM To:

Re: [Tutor] Why is startfile unavailable on my mac?

2006-12-04 Thread Kent Johnson
Nathan Cain wrote: > When I type the following in macpython IDLE,: > >> >> import os >> >> os.startfile() > > I get the following error: > > Traceback (most recent call last): > File "", line 1, in > os.startfile() > AttributeError: 'module' object has no attribute 'startfile' > > Why

Re: [Tutor] Why is startfile unavailable on my mac?

2006-12-04 Thread Mike Hansen
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Nathan Cain > Sent: Monday, December 04, 2006 9:52 AM > To: tutor@python.org > Subject: [Tutor] Why is startfile unavailable on my mac? > > When I type the following in macpython IDLE,: > > >>> imp

[Tutor] Why is startfile unavailable on my mac?

2006-12-04 Thread Nathan Cain
When I type the following in macpython IDLE,: >>> import os >>> os.startfile() I get the following error: Traceback (most recent call last): File "", line 1, in os.startfile() AttributeError: 'module' object has no attribute 'startfile' Why is this unavailable to me? I am trying to ope

[Tutor] Getting the screen size....using Tkinter

2006-12-04 Thread Asrarahmed Kadri
Hi folks, Is it possible to get the screen size using a standard API of Tkinter? And also any function to position the window in the center of the screen..?? Thanks in anticipation. Regards, Asrarahmed Kadri -- To HIM you shall return. ___ Tutor ma

Re: [Tutor] Rounding a float to n significant digits

2006-12-04 Thread Dick Moores
At 12:52 PM 11/30/2006, Dick Moores wrote: >At 11:19 PM 11/27/2006, Dick Moores wrote: > >I just dug this Tim Smith creation out of the Tutor archive. > > > >def round_to_n(x, n): > > """ > > Rounds float x to n significant digits, in scientific notation. > > Written by Tim

Re: [Tutor] How to kill an app from python on windows?

2006-12-04 Thread Tim Golden
[Paulino] | To launch an app one can state os.startfile('hello.pdf') and | the file is opened in acrobat . | | And how can I kill the app from python, in order to, for | instance, rename the file? | | Is it possible? This link may get you started: http://effbot.org/pyfaq/how-do-i-emulate-os-