mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
simplified no Tk() sets _default_root
This commit is contained in:
parent
55618efad9
commit
bbf817557f
1 changed files with 1 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue