<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > import Tkinter > from Tkinter import * > > i have a program where if i comment out either of those import- > statements i get an error. > > i thought they meant the same thing and from was supposed to be just > to imort just a specific function and the * imports everything in the > module. > but aparently the above statements have diffrent meaning and i cant > figure it out fromt he tutorials.
the first statement imports tkinter but everything inside of tkinter in stored in the tkinter namespace, in other words if tkinter has a class tk, then tk would be accessed as tkinter.tk. for example import tkinter blah = tkinter.tk() if you do from tkinter import *, then everything in tkinter is imported at the top level, so it would be from tkinter import * blah = tk() -- http://mail.python.org/mailman/listinfo/python-list