def write(self, str): if len(str) == 0: return if str[-1] != '\n': self.buf.append (str) else: self.buf.append (str[0:-1]) host.log("".join (self.buf)) self.buf = []
def write(self, str): if len(str) == 0: return if str[-1] != '\n': self.buf.append(str) else: self.buf.append(str[0:-1]) host.log("".join(self.buf)) self.buf = []
def write(self, str): if len(str) == 0: return self.buf += str if str[-1] == '\n': host.log(self.name + ': ' + self.buf[0:-1]) self.buf = ''