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

John Salerno johnjsal at
Fri Mar 2 23:16:46 CET 2012

> After that, you can nest as
> many frames, toplevels, and blah widgets under that root window as you
> so desire. Actually you don't even need a "frame", you can pack
> widgets directly into a Toplevel or Tk widget.

This is interesting. I completely understand your point about always calling (and using) the instance of Tk as the root. Given that, what is the point of creating a Frame object at all? I tried NOT doing it, like you said, and it seemed to work fine with my simple example. But is there a benefit to using a Frame object to group the widgets together? Or is it cleaner to just use the Tk object?

More information about the Python-list mailing list