Just fooling around I came across an issue updating a digital-clock like label. This:

self.now=time.strftime('%a. %b %d %Y %H:%M:%S',time.localtime())
        self.clock=ttk.Label(self,text=self.now)
        self.clock.pack()
        while True:
            self.now=time.strftime('%a. %b %d %Y %H:%M:%S',time.localtime())
            self.clock['text']=self.now

simply freezes the program, I've managed to get it to update on certain events like the user hitting a button but I'd like it to continuously update. Any ideas?

EDIT: I got this to work using configure, but why does that work and not this?
Double EDIT:After some thinking I decided it was because the program was stuck in an infinite while loop, however this simply revisits the method.

You are using after timer events as demonstrated in by color changing label demo snippet?

No, I just checked out similar clocks on tkinter using the power of google, I didn't even think to go to the color changing one :(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.