def send(self, to, msg): flag = False for x in self.outputs: if self.get_name(x) == to: send(x, msg) flag = True break if not flag: print "unable to find player {}".format(to)
def send(self, data): send(self.sock, data)