def display(self):
total = <NUM_LIT:0><EOL>count = <NUM_LIT:0><EOL>for i, result in enumerate(self._results):<EOL><INDENT>if total == <NUM_LIT:0>:<EOL><INDENT>self.pre_write()<EOL><DEDENT>self.write(result)<EOL>count += <NUM_LIT:1><EOL>total += <NUM_LIT:1><EOL>if (<EOL>count >= self.pagesize<EOL>and self.pagesize > <NUM_LIT:0><EOL>and i < len(self._results) - <NUM_LIT:1><EOL>):<EOL><INDENT>self.wait()<EOL>count = <NUM_LIT:0><EOL><DEDENT><DEDENT>if total == <NUM_LIT:0>:<EOL><INDENT>self._ostream.write("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>self.post_write()<EOL><DEDENT>
Write results to an output stream