Timing in MacPython?

ventrego at yahoo.com ventrego at yahoo.com
Wed Dec 15 01:46:50 EST 1999


I'm trying to create a simple timer application - something like a 
kitchen timer, just computerized.  However, I'm running into several 
problems:

First,can I force TKinter update the window?  I've set up a label and a 
button with TKinter textvariables, but the changes don't happen until 
after my program returns to idle - in this case, after the time interval 
has elapsed.  I'd like to have changes updated while the timer's waiting,
so that the user knows everything's working correctly.

Second, is there an easy way to sound the system alert sound?   I'm 
referring the one that people can choose in the Sound/Monitors & Sound 
control panel.  It's possible to create a waveform and play it a la' the 
morse.py demo program, but this seems excessively inelegant.

Finally, is there a non-blocking time-delay command?  I'm using 
time.sleep(1), which is working well, but it stops all other processes 
from executing.  Ideally, I'd like this timer to run in the background!
If I was on a UNIX system, I'd use signals, which would be VERY easy,
but I'm a Mac addict at heart. :)

Thanks for any help - 
Michael




More information about the Python-list mailing list