First time using Tkinter and I'm trying to make a widget that displays text from a text file and updates the widget when the text in the file changes. I can get a widget to read from a text file, but I can't seem to make it update when the text changes.
Here's the code I'm using right now:
from Tkinter import *
root = Tk()
root.minsize(740,400)
file = open("file location")
eins = StringVar()
data1 = Label(root, textvariable=eins)
data1.config(font=('times', 37))
data1.pack()
eins.set(file.readline())
root.mainloop()
I've searched for help on updating widgets but I can only find help with updating when a button is pressed or an entry widget is used. I was thinking of using a loop that goes through every minute, but wouldn't that just keep creating new widgets?