#!/usr/bin/env python import tkinter as tk class Application(tk.Frame): def __init__(self, master=None): tk.Frame.__init__(self, master) self.grid() self.createWidgets() def createWidgets(self): self.label1 = tk.Label(self, text = "расрас") self.label1.pack() self.quitButton = tk.Button(self, text='Quit', command = self.remApp) self.quitButton.pack(side = BOTTOM) def remApp(self): self.destroy() app = Application() app.master.title('Sample application') app.mainloop()
ps
python3