from Tkinter import * canvas = Canvas(width=300, height=300, bg='white') canvas.pack(expand=YES, fill=BOTH) canvas.create_rectangle(20, 20, 300, 300, width=5, fill='red') mainloop()