Answers for "run a loop in tkinter"

1

run a loop in tkinter

from tkinter import *

root = Tk()

def task():
    print("hello")
    root.after(2000, task)  # reschedule event in 2 seconds

root.after(2000, task)
root.mainloop()
Posted by: Guest on June-03-2020

Python Answers by Framework

Browse Popular Code Answers by Language