Exemplo n.º 1
0
 def __init__(self):
     self.connected = None
     self.loop = MainLoop(protocol_map, self.poke)
Exemplo n.º 2
0
 def __init__(self):
     print "Init Main object for CamDevice..."
     self._mainLoop=MainLoop.MainLoop()
Exemplo n.º 3
0
from imports import *

import Load
import MainLoop as ml


Load.LoadPro()

while True:
    try:
        ml.MainLoop()
    except:
        print('application closed')
        exit(0)
Exemplo n.º 4
0
def loop():
    from async import MainLoop
    l = MainLoop(protocol_map)
    l.start()
    l.block()
Exemplo n.º 5
0
 def __init__(self):
     print "Init Main object..."
     #Size of application window
     self.dwidth = 800
     self.dheight = 600
     self._mainLoop = MainLoop.MainLoop()
Exemplo n.º 6
0
            os.system('sudo rm /var/run/wpa_supplicant/p2p-dev-wlan0')

            wpsresult = os.popen('sudo wpa_cli wps_pbc').read(
            )  # try to use wps push button mode
            if wpsresult.find('p2p') == -1:
                return True
            else:
                return False

    def WpsConnectionCheck(self, context):
        print " Checking connection...."
        connected = context._binDisplay.showWiFiConnectionProgress()
        return connected


if __name__ == '__main__':
    import MainLoop
    context = MainLoop.MainLoop()
    context.initialize()

    print "Testcode for WiFi"
    wifi = WiFi()
    if wifi.WpsConnectStart():
        print "Press WPS on  router"
        if wifi.WpsConnectionCheck(context):
            print "Connected"
        else:
            print "WPS Connection FAILED"
    else:
        print "WPS PBC FAILED"