For this you can use tkinter:
from tkinter import Tk, Frame, BOTH class Example(Frame): def __init__(self, parent): Frame.__init__(self, parent, background="green") self.parent = parent self.parent.title("Window") self.pack(fill=BOTH, expand=1) root = Tk() root.geometry("500x500") app = Example(root) root.mainloop()