Is there any way to find a widget's parent (specifically button) without saving the parent in an object attribute?
but = Button(main_window, text = "close window!")
but.bind("<Button-1>", btn_handler)
def btn_handler(e):
e.parent().destroy() # I need something like this!
# e.parent() ==>> main_window
# without writing class and defining self.parent ...
I am searching internet for several hours and I didn't find proper answer.