Setting the application's orientation

#Setting the application's orientation
#From S60 3rd edition onwards you can set the orientation of the screen

import appuifw, e32


#Define the exit function
def quit():
    app_lock.signal()

appuifw.app.exit_key_handler=quit

appuifw.app.orientation='landscape'

#or, after waiting 5 seconds
e32.ao_sleep(5)
appuifw.app.orientation='portrait'

app_lock=e32.Ao_lock()

app_lock.wait()