pack is a method of Tkinter widget that needs to be called in order to 
have it displayed with the current geometry manager(which per default is 
  the pack method)

A geometry manager is just a way for arranging widgets into a window. 
Another geometry manager is "grid"

If you don't specify anything, the widget will simply not be displayed.. 
see here:

http://effbot.org/tkinterbook/pack.htm


Hugo

Shi Mu wrote:
> what does pack mean in the following code?
> 
> # File: hello1.py
> 
> from Tkinter import *
> 
> root = Tk()
> 
> w = Label(root, text="Hello, world!")
> w.pack()
> 
> root.mainloop()
> _______________________________________________
> Tutor maillist  -  [email protected]
> http://mail.python.org/mailman/listinfo/tutor
> 
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to