I
I
Ingerniated2018-02-02 02:29:34
Python
Ingerniated, 2018-02-02 02:29:34

Why doesn't it work when calling a file?

Why does nothing appear on the screen when I launch it?

from tkinter import *
tk = Tk()
btn = Button(tk, text="click me")
btn.pack()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
roswell, 2018-02-02
@Ingernirated

The last line should be added
tk.mainloop()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question