while True: [x,y,z] = get_rotation() print x,y,z if y < -500: rotate(1) elif y > 500: rotate(4) elif x < -500: rotate(2) elif x > 500: rotate(8)
time.sleep(1)
win.setAttribute(Qt::WA_Maemo5AutoOrientation, true);