real time scheduler
Stuart Ramsden
Stuart.Ramsden at anu.edu.au
Tue Apr 13 20:26:44 EDT 1999
Bryan VanDeVen wrote:
> Is there a module for scheduling events in real time? I have events
> that need to be repeated indefinitely, each at a given time period. The
> periods are large (at least one minute) and precision requirements are
> not that great (within a few seconds). Is anyone aware of code to do
> this?
I wrote a midi scheduler based on the priority queues described in
Guido's python book. My biggest problem was the latency - I tried
a few mechanisms, including tk's 'after' and a mixture of long and short
sleeps - the best was a tight loop polling for the next time event.
Have a look at the source and ignore the midi stuff (will only run under
SGI and Python 1.2-1.4 anyway)
http://anusf.anu.edu.au/~sjr/midiplayer.py
More information about the Python-list
mailing list