from Tkinter import *

Aahz Maruch aahz at
Fri Mar 9 03:05:17 CET 2001

In article <slrn9ab0g7.s6.matt at>,
Matthew Dixon Cowles <matt at> wrote:
>On Tue, 6 Mar 2001 15:16:31 -0800, Timothy Grant
><tjg at> wrote:
>> All of Fredrik's examples in his guide on Tkinter use
>>from Tkinter import *
>>Now, I'm aware that the effbot is never wrong about anything<wink>,
>>but is it safe to assume that I should not be using the above idiom,
>>but the import Tkinter idiom instead?
>Rest assured, the effbot is right as usual.

Actually, I disagree with the effbot.  I used to think it was okay to
special-case "from Tkinter import *", but I've come to the conclusion
that "import *" is _always_ a Bad Idea in any sort of production code.
Sure it takes more work to write

from Tkinter import Tk, Frame, Button, Entry, Canvas, Text

but I think the payoff in clarity is worth it.
                      --- Aahz (Copyright 2001 by aahz at

Androgynous poly kinky vanilla queer het    <*>
Hugs and backrubs -- I break Rule 6

"..., and some of you may regard all women as evil traps that exist only
to tease, torture, and suck out your very soul."  --DrMax

More information about the Python-list mailing list