Write string s to the stream if a whole new block is ready to be written.
(self, s)
| 449 | self.__write(s) |
| 450 | |
| 451 | def __write(self, s): |
| 452 | """Write string s to the stream if a whole new block |
| 453 | is ready to be written. |
| 454 | """ |
| 455 | self.buf += s |
| 456 | while len(self.buf) > self.bufsize: |
| 457 | self.fileobj.write(self.buf[:self.bufsize]) |
| 458 | self.buf = self.buf[self.bufsize:] |
| 459 | |
| 460 | def close(self): |
| 461 | """Close the _Stream object. No operation should be |
no test coverage detected