class example3: def _init_(self, master): self.lbl=Label(master, text="press button below to exit") self.lbl.pack() self.btn=Button(master, text="quit", command= quit) self.btn.pack() root=Tk() ex3=example3(root) root.mainloop() def quit(self): import sys; sys.exit()
__init__
init
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)