def main(): import sys if sys.platform == "linux2" and "-nopairing" not in sys.argv: from pair import main reactor.callWhenRunning(main) log.startLogging(sys.stdout) if len(sys.argv) > 1: jmain(int(sys.argv[1])) else: jmain() reactor.run()
def main(): droid.log("Starting server") l = jmain(port=0) portnumber = int(droid.startEventDispatcher()) sockl = EventSocket(("127.0.0.1", portnumber)) reactor.callWhenRunning(start_browser, listener=l) reactor.run()
def main(): import sys if sys.platform == "linux2": from pair import main reactor.callWhenRunning(main) log.startLogging(sys.stdout) nobrowser = "--nobrowser" in sys.argv if nobrowser: sys.argv.remove("--nobrowser") if len(sys.argv) > 1: jmain(int(sys.argv[1])) else: jmain() if browser_ready() and not nobrowser: import webbrowser reactor.callLater(1, startbrowser) reactor.run()
def main(): droid.log("Checking if bluetooth is available") if not droid.checkBluetoothState(): droid.toggleBluetoothState(True, True) if not droid.checkBluetoothState(): droid.makeToast("I can't work if you don't enable Bluetooth") time.sleep(1) sys.exit(1) from airi.jinja import main as jmain from airi.stream import MultiPartStream droid.log("Starting server") l = jmain(port=0) portnumber = int(droid.startEventDispatcher()) sockl = EventSocket(('127.0.0.1', portnumber)) reactor.callWhenRunning(start_browser, listener=l) reactor.run() droid.log("Reactor stopped") droid.airiRemoveNotification()