import X vs from x import *
notnorwegian at yahoo.se
notnorwegian at yahoo.se
Thu May 22 13:44:53 EDT 2008
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.
More information about the Python-list
mailing list