Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Can someone explain what ".after" means?
So, I'm writing a tkinter GUI, and it's all going pretty well. I'm new to python, and most of my coding knowledge comes from Excel VBA.

So, I've got a label on my GUI that shows the current time. It was some code I found on the internet, that I was able to apply to my application, but was wondering what exactly the ".after" syntax means and is doing. Can someone explain it in simple English for a newb? Thanks.

    def clock_set(self):
        new_time =        
        new_time = new_time.strftime('%m/%d/%Y       %H:%M:%S')
        if new_time != self.time_now:
            self.time_now = new_time
            self.curr_time["text"] = self.time_now
        self.curr_time.after(200, self.clock_set)
it means to execute clock_set after 200 ms
p_hobbs likes this post
Thank you.

Top Page

Forum Jump:

Users browsing this thread: 1 Guest(s)