Timing problem?

Steve Gronicus at SGA.Ninja
Thu Mar 21 09:59:51 EDT 2019


I believe I can see what is happening here but maybe someone can explain least I run into this again.

Situation 1: I am using "ws.MessageBeep(1)" to generate a tone through the speakers. I wanted two tones to separate it from other tones that might happen and placed that code a second time in the next line.  Sometimes it would not beep, others just one beep.

Situation 2" At the end of my program a report is generated and then it calls timer1.py to remind me when to enter the next readings from the lab.  It looks as if the report generation is interrupted when timer1.py is called.

If I place "time.sleep(1)" between the commands for the beep, I get two beeps one second apart reliably.
If I place "time.sleep(5)" between the report generation the call for timer1.py is called then apparently there is enough time for the report to be generated.

What is happening?


--------------------------------------------------------------------------------------------
Footnote:
There's 99 bugs in the code, in the code.
99 bugs in the code.
Take one down and patch it all around.
Now there's 117 bugs in the code.




More information about the Python-list mailing list