Write a string into the output stream.
(self, x)
| 380 | pass |
| 381 | |
| 382 | def write(self, x): |
| 383 | """Write a string into the output stream.""" |
| 384 | if self._new_lines: |
| 385 | if not self._first_write: |
| 386 | self.stream.write('\n' * self._new_lines) |
| 387 | self.code_lineno += self._new_lines |
| 388 | if self._write_debug_info is not None: |
| 389 | self.debug_info.append((self._write_debug_info, |
| 390 | self.code_lineno)) |
| 391 | self._write_debug_info = None |
| 392 | self._first_write = False |
| 393 | self.stream.write(' ' * self._indentation) |
| 394 | self._new_lines = 0 |
| 395 | self.stream.write(x) |
| 396 | |
| 397 | def writeline(self, x, node=None, extra=0): |
| 398 | """Combination of newline and write.""" |
no test coverage detected