Tkinter: Do you really need a "root"?

Greg Ewing (using g2h5dqi002 at
Tue Jun 10 05:16:42 CEST 2003

> In article <c281f461.0306071450.553776ea at>,
>  bobsmith327 at (Bob Smith) wrote:
>>from Tkinter import *
>>root = Tk()
>>app = Frame(root)
>>But do I really need root?...

Yes. This is an annoying quirk of Tk. If you don't
explicitly create a root window, Tkinter will create
one for you, but one must exist.

You can hide it if you want, though, by doing

Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand

More information about the Python-list mailing list