Aug-24-2021, 10:34 PM
(This post was last modified: Aug-25-2021, 12:31 AM by RobertAlvarez424.)
import tkinter as tk root = tk.Tk() logo = tk.PhotoImage(file="python_logo_small.gif") w1 = tk.Label(root, image=logo).pack(side="right") explanation = """At present, only GIF and PPM/PGM formats are supported, but an interface exists to allow additional image file formats to be added easily.""" w2 = tk.Label(root, justify=tk.LEFT, padx = 10, text=explanation).pack(side="left") root.mainloop()new to python and tkinter , here a sample code I got in this tutor for tkinter .
So between root = tk.Tk() and root.mainloop() is the code for this dialog box.
My question is w1 and w2 . These are defined but do not understand how they are called to be used in root.mainloop() ?