[Tutor] question about import statement

Bill Allen wallenpb at gmail.com
Fri Aug 27 02:15:31 CEST 2010

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()

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100826/690c87ee/attachment-0001.html>

More information about the Tutor mailing list