Hi,

let's consider this exemple :

from tkinter import *
from tkinter.ttk import *

class First:
        def __init__(self):
                self.root = Tk()
                B = Button(self.root, command=self.op)
                B.pack()
                
                self.root.mainloop()
                
        def op(self):
                Second(self)
                print("print")
                
                
class Second:
        def __init__(self, parent):
                root = Toplevel(parent.root)
                root.grab_set()
                
                root.mainloop()

                
First()



when I close the second window, the print is NOT executed. It's done when I close the first window.
Why do it "freeze" my function?

Dorian
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to