[Tutor] How to enable pausing my timer.py ?
alan.gauld at blueyonder.co.uk
Wed Jul 7 21:25:25 CEST 2004
> I just realized that my stopwatch was really a timer: you set it to
> after a length of time you enter; it stops and beeps when that time
You could make it even more general purpose buy putting the guts of it
in a function called say, doAfter()
''' t is the time required and f is a function to be executed
after t expires.'''
Thus in your current case you would call
doAfter( t, lambda : winsound.beep(500) )
Just a thought... :-)
More information about the Tutor