Programe uma função Python dentro do loop tknter
root = Tk()
Alert Albatross
root = Tk()
def task():
root.after(2000, task) # reschedule event in 2 seconds
print("hello")
root.after(2000, task)
root.mainloop()