2

I'm making a timer app as a beginner project in Python and so far I have the countdown part working in a function shown below:

#countdown timer function
def countdown(count):
    timeRemaining['text'] = '%02d : %02d' % (count/60 , count%60)
    timeRemaining.config(fg=SpaceCadet)
    if count > 0:
        root.after(1000, countdown, count-1)
        startButton.config(text="STOP", command=lambda: [stop()])

I wanted to add a new function called stop in order to pause the current time and stop the clock from counting down. Is there a way for me to do this?

(If it makes it easier to understand what I'm trying to achieve the full code can be found here https://github.com/lewis-cooper/Pomodoro-Timer/blob/master/pomodoro_timer.py)

Lewis Cooper
  • 63
  • 10

0 Answers0