def write(self, s): if self.interactive: if isinstance(self.screen,deluge.ui.console.modes.legacy.Legacy): self.screen.write(s) else: self.events.append(s) else: print colors.strip_colors(s.encode(self.encoding))
def write(self, s): if self.interactive: if isinstance(self.screen,deluge.ui.console.modes.legacy.Legacy): self.screen.write(s) else: component.get("LegacyUI").add_line(s, False) self.events.append(s) else: print colors.strip_colors(s.encode(self.encoding))
def write(self, s): if self.interactive: if isinstance(self.screen, deluge.ui.console.modes.legacy.Legacy): self.screen.write(s) else: component.get("LegacyUI").add_line(s, False) self.events.append(s) else: print colors.strip_colors(s.encode(self.encoding))
def write(self, line): """ Writes a line out depending on if we're in interactive mode or not. :param line: str, the line to print """ if self.interactive: self.screen.add_line(line, not self.batch_write) else: print colors.strip_colors(deluge.common.utf8_encoded(line))
def write(self, line): """ Writes a line out depending on if we're in interactive mode or not. :param line: str, the line to print """ if self.interactive: self.screen.add_line(line, not self.batch_write) else: print colors.strip_colors(line.encode("utf-8"))
def write(self,line): print(strip_colors(line))