This reads until EOF using readline() and returns a list containing the lines thus read. The optional 'sizehint' argument is ignored. Remember, because this reads until EOF that means the child process should have closed its stdout. If you run this method on a child t
(self, sizehint=-1)
| 497 | return iter(self.readline, self.string_type()) |
| 498 | |
| 499 | def readlines(self, sizehint=-1): |
| 500 | '''This reads until EOF using readline() and returns a list containing |
| 501 | the lines thus read. The optional 'sizehint' argument is ignored. |
| 502 | Remember, because this reads until EOF that means the child |
| 503 | process should have closed its stdout. If you run this method on |
| 504 | a child that is still running with its stdout open then this |
| 505 | method will block until it timesout.''' |
| 506 | |
| 507 | lines = [] |
| 508 | while True: |
| 509 | line = self.readline() |
| 510 | if not line: |
| 511 | break |
| 512 | lines.append(line) |
| 513 | return lines |
| 514 | |
| 515 | def fileno(self): |
| 516 | '''Expose file descriptor for a file-like interface |