Paul Rubin wrote:
> a = Event()
> Thread(target=f, args=(a,)).start()
> raw_input('hit return when done: ')
> a.set()
Simple and elegant.
Thank you.
Alan
--
http://mail.python.org/mailman/listinfo/python-list
Alan Isaac <[EMAIL PROTECTED]> writes:
> while True:
> sys.stdout.write('\a')
> sys.stdout.flush()
> time.sleep(0.5)
>
> I want to add code to allow me to turn off this alarm and then
> interact with the program in its new state (which the al
Goal: turn off an audible alarm without
terminating the program. For example,
suppose a console program is running::
while True:
sys.stdout.write('\a')
sys.stdout.flush()
time.sleep(0.5)
I want to add code to allow me to turn off
this alarm