#!/usr/bin/python3 from tkinter import * class FFUI(Frame): def __init__(self, master): Frame.__init__(self, master) self.pack(fill='both', expand=1) self.textwindow = Frame(self) self.controls = Frame(self) self.controls.pack(side=RIGHT) self.textwindow.pack(side=LEFT, fill='both', expand=1) self.editor = Text(self.textwindow) self.editor.pack(fill='both', expand=1) self.something_button = Button(self.controls, text="Do Something", command=self.demo_function) self.something_button.pack() Button(self.controls, text="Change other button", command=self.change_text).pack() def demo_function(self): self.editor.insert(END, "hi"); def change_text(self): self.something_button.configure(text = "moose") root = Tk() w,h = root.winfo_screenwidth(), root.winfo_screenheight() root.geometry("%dx%d+0+0" % (400, 400)) root.title("Tkinter Demo") ffui = FFUI(root) root.mainloop()