M
M
MarkPro1002021-10-24 13:50:10
Python
MarkPro100, 2021-10-24 13:50:10

tkinter window not opening?

from tkinter import *

def printer(event):
    print ("Hello")

root = Tk()
but = Button(root)
but["text"] = "Печать"
but.bind("<Button-1>",printer)

but.pack()
root.mainloop

I'm just starting to learn tkinter and here's the thing.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-10-24
@MarkPro100

root.mainloop ()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question