Creating a StopWatch or Timer in Tkinter Python | Learn Everyday

preview_player
Показать описание
This video tells how to create a simple timer or a stopwatch using the tkinter module, Before watching this video you must be familiar with the basic functioning of the tkinter module and how to use classes with a tkinter module.
Please refer these video for learning how to use classes with Tkinter:

Click this link for code:

Рекомендации по теме
Комментарии
Автор

Thank you so much.

The only thing I found need to be double checked is doing multiple clicks on start button which makes it faster and faster which will be shorter than the normal second.
All other code looks great, and was really helpful to me.

hassanalshekha
Автор

Thank you very much for the explanation and the tutorial helped me a lot, I thank you.

mexjorge
Автор

Thank you very much! This is super helpful!

gannozforthewin
Автор

What is that 'self 'in the code? Can you please explain!! Thank you!

karangowda
Автор

You may use h = str(h).zfill(2) to solving {%d%d} problem
And
elif (m == 59) :
m = 0 ( --> missing)
h += 1
Thank you so much for your video.
Hopefully you can make a Tkinter that having Timer & Stopwatch in different screen function.

tankaiyi
Автор

The code works good but there is something missing: when you start the timer, this one inmediatelly starts in 00:00:01 but this is wrong because it should take 1 second to show it. But thanks for the help!

DanielSilva-fvbr
Автор

Brother there is issue with your code, if you run the timer for about an hour. It starts showing the wrong digit at hour place, check your code again

namitmishra
Автор

where is the mainloop() part??? How does this work without that?

kapilanps
Автор

I want to create exactly the same thing but I want the stopwatch to stop when I lock my pc and start when I unlock it

sjxqhbp
Автор

Hi, I downloaded your code from the link but when i try to run it, it doesn't show anything (the window doesn't show up) but there's not any syntax error because the debugger tells that everything is fine. Can you tell me if there's something else missing in the code?

DanielSilva-fvbr
Автор

after minute reaches 59 then you are not doing m = 0 inside hour check

namitmishra
Автор

Hi, It is not working, Process finished with exit code 0, I have used your source code
, do you have any idea, thanks ?

adiepsicom