from Tkinter import * def funcion(seleccion, figura): vs = Toplevel() vs.configure(bg="gray") vs.title(figura) if seleccion == 1: panel = Canvas(vs, width=640, height=180, bg="gray") panel.pack() # BODY panel.create_polygon(50,10,70,10,70,30,90,30,90,50,150,50,150,30,170,30,190,30,190,10, 170,10,170,50,190,50,190,70,210,70,210,90,230,90,230,150,210,150, 210,110,190,110,190,150,170,150,130,150,130,170,170,170,170,130, 70,130,70,150,70,170,110,170,110,150,50,150,50,110,30,110,30,150, 10,150,10,90,30,90,30,70,50,70,50,50,70,50,70,30,50,30,50,10, width=1, fill="green", outline="black") # OJO panel.create_polygon(70,70,90,70,90,110,70,110,70,70, width=1, fill="white", outline="black") # ...