Read and return up to size bytes, where size is an int. If the argument is omitted, None, or negative, reads and returns all data until EOF. If the argument is positive, and the underlying raw stream is not 'interactive', multiple raw reads may be issued to satisfy
(self, size=-1)
| 670 | """ |
| 671 | |
| 672 | def read(self, size=-1): |
| 673 | """Read and return up to size bytes, where size is an int. |
| 674 | |
| 675 | If the argument is omitted, None, or negative, reads and |
| 676 | returns all data until EOF. |
| 677 | |
| 678 | If the argument is positive, and the underlying raw stream is |
| 679 | not 'interactive', multiple raw reads may be issued to satisfy |
| 680 | the byte count (unless EOF is reached first). But for |
| 681 | interactive raw streams (XXX and for pipes?), at most one raw |
| 682 | read will be issued, and a short result does not imply that |
| 683 | EOF is imminent. |
| 684 | |
| 685 | Returns an empty bytes array on EOF. |
| 686 | |
| 687 | Raises BlockingIOError if the underlying raw stream has no |
| 688 | data at the moment. |
| 689 | """ |
| 690 | self._unsupported("read") |
| 691 | |
| 692 | def read1(self, size=-1): |
| 693 | """Read up to size bytes with at most one read() system call, |