I have the following code:
def countdown():
def countdown1():
print 'countdown1'
def countdown2():
def countdown3():
takePic()
self.pic.set_markup("<span size='54000'>1</span>");
print 1
t3 = Timer(1.0, countdown3)
t3.start()
self.pic.set_markup("<span size='54000'>2</span>");
print 2
t2 = Timer(1.0, countdown2)
t2.start()
self.pic.set_markup("<span size='54000'>3</span>");
print 3
t1 = Timer(1.0, countdown1)
t1.start()
countdown()
It should show a countdown from 3. The number 3 appears, but afterwards nothing happens. help?
Why not just
.join()your timer threads after you.start()them, so that the rest of your code waits until the timers are done to continue?