1# Use Tkinter for python 2, tkinter for python 3
2import tkinter as tk
3
4class MainApplication(tk.Frame):
5 def __init__(self, parent, *args, **kwargs):
6 tk.Frame.__init__(self, parent, *args, **kwargs)
7 self.parent = parent
8
9 <create the rest of your GUI here>
10
11if __name__ == "__main__":
12 root = tk.Tk()
13 MainApplication(root).pack(side="top", fill="both", expand=True)
14 root.mainloop()