I\'m updating some LEDs using python. I\'ve been doing this like so:
from LEDs import * myLEDs = LEDs() done = False while not done: myLEDs.iterate()
Although I am not the most qualified to comment here: I think this might help you.
How to run recurring task in the Python Flask framework?