def simulation_canvas (parent,**config): global the_canvas the_canvas = Canvas(parent,**config) the_canvas.bind("<ButtonRelease>", lambda event : model.mouse_click(event.x,event.y)) the_canvas.bind("<KeyPress-Up>", model.up_key) the_canvas.bind("<KeyPress-Right>", model.right_key) the_canvas.bind("<KeyPress-Left>", model.left_key) return the_canvas
def simulation_canvas(parent, **config): global the_canvas the_canvas = Canvas(parent, **config) the_canvas.bind("<ButtonRelease>", lambda event: model.mouse_click(event.x, event.y)) return the_canvas
def simulation_canvas (parent,**config): global the_canvas the_canvas = Canvas(parent,**config) the_canvas.bind("<ButtonRelease>", lambda event : model.mouse_click(event.x,event.y)) return the_canvas