[Tutor] pausing time and perform on exit

Kyle Babich kyle@sent.com
Thu Oct 31 20:05:04 2002


I actually have two questions--first do date I have never figured out how to
pause time.  The best of come up with is simple while loops that look for
something to happen but its fair to say I'm clueless.

timetosleep = 0
while timetosleep < 60:
    time.sleep(1)
    timetosleep += 1

Any ideas how to pause time?

Also how would I tell the program to do something when the program is exited
by having the window closed to the computer shut down (anything with the
user manually typing 'quit' into the program)?  I don't even know where to
begin with this.

Thank you agian,
Kyle Babich