[Tutor] How to enable pausing my stop_watch.py ?

Dick Moores rdm at rcblue.com
Thu Jul 8 10:16:33 CEST 2004

Alan Gauld wrote at 12:04 7/7/2004:
> > I would like to enable pausing and then resuming stop_watch.py. For
> > example, say I've set it to beep after 30 minutes. I start it, but
> > discontinue the activity I'm timing. I want to pause the stopwatch
> > pressing a key and then resume later by pressing (another?) key,
>just as
> > I could do with a real stopwatch. Is this possible?
>Yes, you might want to look at the getch() function.
>Windows has it in msvcrt module
>Linux in the curses module
>An example in my event driven programming topic in my tutor

Here's that page without the frame:

I'm afraid I don't understand enough to know where to put this line:
self.txtBox.bind("<Key>", self.doKeyEvent)

Could you please do a copy and paste and shoot back the whole script so I 
can see what it does?

And thanks VERY much for your other detailed comments and suggestions.

Dick Moores

More information about the Tutor mailing list