tutor  

[Tutor] question about import statement

Bill Allen
Thu, 26 Aug 2010 17:17:31 -0700

I was experimenting with Tk today, just trying it out.   I found this
example of a very simple "hello world" button click program.  This is it.

from tkinter import *
from tkinter import ttk
root = Tk()
button = ttk.Button(root, text="Hello World").grid()
root.mainloop()

What I don't understand is why it is necessary to run that import statement
twice.  Shouldn't import * bring everything in from tkinter?


Just wondering,

Bill Allen
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor