def run(self): """Main""" global SON global TLP while not self._stopevent.isSet(): data = input(">") if data == "quit": TLP.stop() self.stop() elif data == "Tais toi!": SON = False elif data == "Parle!": SON = True elif re.search("je.*envoie.*fichier", data): regex = re.search(r"[A-Za-z]*.\.[A-Za-z]*", data) fileName = regex.group(0) data2, infos = FileManager.sendFichier(0, fileName) if infos[1] == 0: Client.sendFile(data2, fileName) else: choix = input(data2) data2, infos = FileManager.sendFichier(1, choix, infos) elif len(data): Client.sendMsg("T", str(data)) else: continue