Is it necessary to call Tk() when writing a GUI app with Tkinter?

John Salerno johnjsal at
Thu Mar 1 07:14:41 CET 2012

> What exactly is the purpose of doing that? Does Tk do some extra work that a simple call to Frame won't do?

More specifically, what is the benefit of doing:

root = tk.Tk()
app = Application(master=root)

as opposed to:

app = Application()

Also, in the first example, what is the difference between calling app.mainloop() and root.mainloop()? They both seemed to work when I ran them.

More information about the Python-list mailing list