A Digital clock built with Python tkinter

preview_player
Показать описание
This is a follow on video from the last video in the playlist that showed how to display the current time in a Python tkinter window. This video shows how to continually update the current time thus producing a digital clock.

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

Thank you so much John for explaining this concept so systematically, wonderfull!!

SyedZaidi-xpcx
Автор

Excelente video, more clear imposible!!! Very well explain how create a timer!!!!

sergiopadronarellano
Автор

Great! That Tkinter 'after' function is just what
I need for my little project.
Thanks again for you wonderful tutorials.

quazichimp
Автор

an amazing explanation of code! great job my friend!

aleisastia
Автор

Flawless Tutorial! amazing explanation step by step. This makes learning FUN!

jumpingjoly
Автор

thanq so much. it helped me a lot in developing my gui for showing live field device values

nnaveen
Автор

Python is good thanks to your explanation

leozendo
Автор

A comment or a question, that is the question.
I note that the function display_time() is called just before the mainloop(), and then mainloop() executes.
This implies that there is a return at the end of the function or subroutine, display_time().

Now, display _time is called at the end of display_time with .after() method.
This seems to me to be a little bit recursive. Is it?
I know the answer it that it is not recursive, as if it were the program would come to a sticky end after a while.

So, there it is then.
Thanks for a great video, and all the other ones of yours I have watched.

stevemorse
Автор

Thanks a lot for that video;crystal clear!

ricouxstephane
Автор

John tanks for the video ! I speak very little English, but despite that, I understood everything, very good example 👍

kimochiratirusisuka
Автор

Another great video thank you, it would be great if you could do a series about python interacting with databases :)

webaruhazberles
Автор

yep, I prefered the digits in yellow, got it running on my Raspberry Pi4.

SusanAmberBruce
Автор

♥️♥️

Sir can we provide second directly into the after method instead of milliseconds.
If yes than how?

For example I'm designing a clock which update afer every one hour. Than can i pass the hour instead of milliseconds..

Thanks for such a nice videos.
Waiting for upcoming videos.

Thanks again!!!

feezankhattak
Автор

You're a just an awesome, .... :-)

kvnagendra
Автор

Hi thanks for the video
I am playing around writing an interval timer so I take a break from work every so often (I know there are a few out there but thought it would give me good practice). I used the .after as per this video but have an anomaly.
I created a def like this
def interval(ms, song):
root.after(ms, play_sound(song))
which calls another def to play the sound
def play_sound(song):
mixer.music.load(song)
mixer.music.play()
it is called in a while loop but when I call it the sound plays straight away and then the wait happens.
If I change the interval function to just
def interval(ms):
root.after(ms)
and call it followed by a call to play_sound, in the while loop, the sound now plays correctly after the wait period.
Can you give me an idea of where I have gone wrong please

gerryoconnor
Автор

I've noticed using this method of "after" when updating information on the GUI is quite taxing. Trying to drag the window or do any button presses (etc.) are very jagged and lagging. If there any efficient way of coding these updating actions besides upping the time in ms in the after function? Even at '1000' the GUI is slow when being dragged even though I so far only have a clock (and I plan to add much more info that must be updated every couple of seconds)

wertaustin
Автор

I am having problems with buttons getting stuck when calling mp3s...in chance that you can cover multi-threading ? Thanks.

dimitriosdesmos
Автор

Is there a user group and is there a place to download the code for the tutorials ?

jerlopez