main_window = .... # set this to your main window rotation = FremantleRotation(main_window) # we're in auto-rotation mode now rotation.set_mode(FremantleRotation.ALWAYS) # we're now forcing portrait mode rotation.set_mode(FremantleRotation.NEVER) # we're now forcing landscape mode rotation.set_mode(FremantleRotation.AUTOMATIC) # and automatic mode again # you can also get the mode mode = rotation.get_mode() if mode == FremantleRotation.AUTOMATIC: # do something here elif mode == FremantleRotation.ALWAYS: # something else here elif mode == FremantleRotation.NEVER: # you get the idea...