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