[Tkinter-discuss] Tkinter-discuss Digest, Vol 34, Issue 5

Bob Greschke bob at passcal.nmt.edu
Fri Dec 8 00:25:08 CET 2006

----- Original Message ----- 
From: Harlin Seritt
To: tkinter-discuss at python.org
Sent: Thursday, December 07, 2006 4:14 AM
Subject: Re: [Tkinter-discuss] Tkinter-discuss Digest, Vol 34, Issue 5

Hiya G G

In case you're a freak about namespace polution (and that's really a good 
thing), you can generally rest assured that you'll be almost always fine 
when you do a full namespace import of Tkinter module.

Harlin Seritt


Yeah, I forgot to mention that using something like  from Tkinter import * 
can get you into trouble if you happen to do something like name a variable 
"Radiobutton".  To see a list of things you shouldn't name variables and 
functions you can start the Python interpreter, enter  'from Tkinter import 
*'  and then  dir()  and it will list everything...although you also have to 
then enter commands like  dir(__builtins__), etc.  to get the complete list.

Is there a way to get the complete list of used keywords with one command?

In my programs my variables always start with an upper case letter and my 
functions always start with a lower case letter (that's just backwards to 
normal human beings) which has seemed to keep me out of trouble for about 
300,000 lines of code.  I usually do things like

from time import sleep, gmtime, time

instead of using  from time import *.  I guess it's only Tkinter where I 
import *.


More information about the Tkinter-discuss mailing list