Ejemplo n.º 1
0
def main():
    a = QApplication(sys.argv)
    spreadsheet = CurrentMouse()
    jsonName = "SourisDynamique-a348c1bc1c12.json"
    worksheetName = "InterfaceSouris"
    arduino = Arduino.Arduino()

    # try:
    print("Connecting to Google SpreadSheet...")
    spreadsheet.spreadsheetOpen(jsonName, worksheetName)
    print("Creating local data...")
    spreadsheet.openLocalData()  # Used for RFID and time stamp verification
    queue = Queue.Queue()
    x = ReadThread(spreadsheet, arduino, queue)
    print("Creating GUI...")
    gui = MainGui(spreadsheet, x, arduino, queue)
    localMouseInfo = dict()
    print("Program is ready")
    a.exec_()
    # except:
    #    print("Error: Unable to open spreadsheet")

    # sys.exit(a.exec_())
    print("Program terminated")