from Tkinter import * master = Tk() # create an empty frame (the 'master' frame) w = Canvas(master, width=200, height=100) # create a canvas widget attached to master # http://effbot.org/tkinterbook/canvas.htm w.pack() # make the canvas fill the master frame w.create_line(0, 0, 200, 100) # draw some stuff w.create_line(0, 100, 200, 0, fill="red", dash=(4, 4)) w.create_rectangle(50, 25, 150, 75, fill="blue") mainloop() # start the event handling loop