Tkinter クラステンプレート import tkinter as tk class Application(tk.Frame): def __init__(self, master=None): tk.Frame.__init__(self, master) master.title("My application") self.pack(expand=1, fill=tk.BOTH, anchor=tk.NW) self.create_widgets() def create_widgets(self): self.label = tk.Label(self, text='Input file') self.label.grid(column=0, row=0) root = tk.Tk() app = Application(master=root) app.mainloop() |