Op 11-11-13 10:41, JL schreef: > I am trying to implement a multivibrator function with python. This is how it > works; > > - An trigger event happens > - Upon receiving the event, a variable goes high for 5secs, then go low. > - If the event happens again before the 5secs expire, the high duration will > be extended by another 5 secs. This works like a retriggerable multivibrator > for those who are into electronics. > > Is there some sample code for this problem or can someone point me to using > the right library for this feature? > > Thank you very much. > The problem is that it depnds on the kind of trigger event. Is it a signal? Is it a character that arrives through a pipe or socket?
I would take a look at the signal module and see if it can get you started. -- Antoon Pardon -- https://mail.python.org/mailman/listinfo/python-list