Python Forum
[Tkinter] Trying to display a changing variable
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Trying to display a changing variable
#5
Can root.after pass arguments?  I don't know, before that example, I never used it.

http://effbot.org/tkinterbook/widget.htm...ter-method
Quote:after(delay_ms, callback=None, *args)
Registers an alarm callback that is called after a given time.  This method registers a callback function that will be called after a given number of milliseconds. Tkinter only guarantees that the callback will not be called earlier than that; if the system is busy, the actual delay may be much longer.The callback is only called once for each call to this method. To keep calling the callback, you need to reregister the callback inside itself

Emphasis mine. So it isn't guaranteed to run at exactly the time you pass it. Do you have an infinite loop anywhere? Or anything that would hang the main thread, like time.sleep()?
Reply


Messages In This Thread
RE: Trying to display a changing variable - by nilamo - Aug-08-2017, 07:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Trying to display a variable in a label Jordansonatina 2 17,974 Oct-31-2019, 06:28 PM
Last Post: Jordansonatina
  Display and update the label text which display the serial value jenkins43 5 9,188 Feb-04-2019, 04:36 AM
Last Post: Larz60+
  Display more than one button in GUI to display MPU6000 Sensor readings barry76 4 4,004 Jan-05-2019, 01:48 PM
Last Post: wuf

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020