def trim_output(self, eat_newlines=False):
    self.trim_output_line(self.output_lines[(- 1)])
    while (eat_newlines and (len(self.output_lines) > 1) and (len(self.output_lines[(- 1)].text) == 0)):
        self.output_lines.pop()
        self.trim_output_line(self.output_lines[(- 1)])
def trim_output(self, eat_newlines=False):
    self.trim_output_line(self.output_lines[(- 1)])
    while (eat_newlines and (len(self.output_lines) > 1) and (len(self.output_lines[(- 1)].text) == 0)):
        self.output_lines.pop()
        self.trim_output_line(self.output_lines[(- 1)])