import SimpleGUICS2Pygame.simpleguics2pygame as simplegui width = 150 height = 150 pos = [int(width/2),int(height/2)] r= 15 v = 4 def draw(canvas): canvas.draw_circle((width,height),20,2,'red','red') def keymotion(key): global v,width,height,pos,r if key ==simplegui.KEY_MAP['down']: height+=v if key ==simplegui.KEY_MAP['up']: height-=v if key ==simplegui.KEY_MAP['right']: width+=v if key ==simplegui.KEY_MAP['left']: width-=v frame = simplegui.create_frame('keyevent',300,300,300) frame.set_keydown_handler(keymotion) frame.set_draw_handler(draw) frame.start()