[Tutor] Tkinter: no module named messagebox (brandon w)
Wayne Werner
waynejwerner at gmail.com
Sun Aug 14 15:07:30 CEST 2011
On Aug 14, 2011 2:12 AM, "Robert Sjoblom" <robert.sjoblom at gmail.com> wrote:
>
> However, given that Tkinter is such a huge package to begin with, I'd
> say that you should continue to use from Tkinter import *, but be
> aware of what you're doing when you type that, and that there is a
> certain risk of conflicts.
Also, most (all?) Tkinter names are uppercase, such as Button, Label, etc.
Of course I personally I usually do
import Tkinter as tk
Which means I only have to type 3 extra characters, but it removes any
ambiguity - tk.Something had to come from Tkinter, and never something that
I defined.
I suppose it's really all about trade-offs, and what you find works best, or
whatever the prevailing convention is when you're working with others.
-Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110814/cfcba6ac/attachment.html>
More information about the Tutor
mailing list