Updating tkinter label text
0
I made a little script that takes some values from a web page and displays them as tkinter labels. The values are updated every 5 minutes. How can I make the labels update every time the values change? url = 'https://myurl.something' def check(): sleep(300) value1 = str(requests.get(url)) root = Tk() label1 = label(root, text=value1) label1.grid() while True: check() root.mainloop() I know that the sleep loop could never work, but that's how I did this before adding a GUI
python tkinter
share | improve this question
edited Nov 15 '18 at 23:36
Stefano
...