def test_key(self): print "Button test. Press the 'up' key!" for i in range(0,10): print UI.isPressed(0) time.sleep(1)