Esempio n. 1
0
        userName = newUsername

        #send a newuser marker to the server
        dictFromInput = sendData(usertype, newUsername, newPassword)

        isAdminUser = dictFromInput["isAdminUser"]
        correctEntry = dictFromInput["correctUsernameAndPassword"]

        if correctEntry == "Invalid":
            print "This username already exists."
            sys.exit()

        filePath = dictFromInput["filePath"]

        # change for whatever user / file path is acquired above
        watchMachine.oneDir = dictFromInput["filePath"]
        watchMachine.username = userName

        watch_process.start()

        # port = whichever port we determine will be the client listening port (1235?)
        listenMachine.dir_path = filePath
        reactor.listenTCP(listenMachine.listen_port, listenMachine)

        listen_process = Process(target=reactor.run)
        listen_process.start()


        while True:
            syncState = syncOptions(syncState)