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

John Salerno johnjsal at gmail.com
Fri Mar 2 00:22:55 EST 2012


> Hmm, it seems as though i am the latest victim of the "copy/paste
> error"! Oh well, if you were going to absorb my teachings, you would
> have absorbed them by now. I am moving on unless a new subject needs
> explaining.

Well, I've certainly absorbed your recommendation to always create the root explicitly, but you still haven't really explained WHY. Telling me that I will eventually find out as I become more proficient isn't very helpful.

I like being explicit, so I will create the Tk option like you suggest (although I don't see the need to subclass it first), but I also like knowing WHY I do what I do, so it would help to have some reason why it's better to create the root explicitly rather than allow Tkinter to do it.



More information about the Python-list mailing list