View Single Post
Posts: 324 | Thanked: 371 times | Joined on Dec 2009 @ Vancouver, BC
#3
Here is how I did it:

Code:
try:
    from osso import Context,  DeviceState
    use_osso = True
except:
    use_osso = False

init()
if use_osso:
    osso_c = Context("Flobby", "0.0.1", False)
    device = DeviceState(osso_c)
Then every 10 seconds, run:
Code:
if use_osso:
       device.display_state_on()
 

The Following User Says Thank You to Slocan For This Useful Post: