def try_switch_bt_on(): try: import pybtswitch if not pybtswitch.get_power_state(): pybtswitch.set_power_state(1) except: pass
import pybtswitch print(repr(pybtswitch.get_power_state())) print "all done"