how tkinter mainloop while doing stuff code example Example: tkinter mainloop from tkinter import* root=Tk() root.mainloop