----- Original Message ----- From: Harlin Seritt To: [email protected] 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 *. Bob _______________________________________________ Tkinter-discuss mailing list [email protected] http://mail.python.org/mailman/listinfo/tkinter-discuss
