Is it necessary to call Tk() when writing a GUI app with Tkinter?
mark at markroseman.com
Fri Mar 2 18:57:34 CET 2012
Rick Johnson <rantingrickjohnson at gmail.com> wrote:
> Book authors and Doc authors are not always the most well informed; as
> we have witnessed by this very thread! Obviously these tutorials are more
> like: "What NOT to do when coding Tkinter GUIs!" No wonder everyone hates Tkinter. :-)
Indeed. One of the things that motivated me to write the tutorial at
http://www.tkdocs.com is the rather poor state (in terms of being out of
date, incorrect, or demonstrating poor practices) of most Tkinter
Call it self-serving, but I think the Tkinter world would be a happier
place if everyone just pointed to TkDocs. ;-)
To your point about explicit root, etc. I'll make the general
observation that lots of different things work in a given situation,
which is just fine for quick little hacky things. If people are doing
anything more than a throwaway however, they'd be better served by
spending a bit of time learning the conceptual underpinnings (e.g.
http://www.tkdocs.com/tutorial/concepts.html) after which the "right"
thing to do will be more obvious.
More information about the Python-list