This program, example1.py:

> from tkinter import *
> 
> root = Tk()
> canvas = Canvas()
> canvas.pack()
> 
> root.mainloop()


and this one, example2.py:

> from tkinter import *
> 
> canvas = Canvas()
> canvas.pack()
> 
> mainloop()

do exactly the same thing, as far as I can tell. Yet, most examples I
find on the net use the first form. Why?
I must be missing something, but I can't figure what is the utility of
root. Can you help?

PierreD.
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
https://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to