simplified no Tk() sets _default_root
This commit is contained in:
parent
55618efad9
commit
bbf817557f
|
@ -4,9 +4,8 @@ import sys
|
|||
def main():
|
||||
filename = sys.argv[1]
|
||||
root = Tk()
|
||||
label = Label(root)
|
||||
img = PhotoImage(file=filename)
|
||||
label['image'] = img
|
||||
label = Label(root, image=img)
|
||||
label.pack()
|
||||
root.mainloop()
|
||||
|
||||
|
|
Loading…
Reference in New Issue