MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / read

Method read

tools/python-3.11.9-amd64/Lib/_pyio.py:706–724  ·  view source on GitHub ↗

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 sa

(self, size=-1)

Source from the content-addressed store, hash-verified

704 """
705
706 def read(self, size=-1):
707 """Read and return up to size bytes, where size is an int.
708
709 If the argument is omitted, None, or negative, reads and
710 returns all data until EOF.
711
712 If the argument is positive, and the underlying raw stream is
713 not 'interactive', multiple raw reads may be issued to satisfy
714 the byte count (unless EOF is reached first). But for
715 interactive raw streams (XXX and for pipes?), at most one raw
716 read will be issued, and a short result does not imply that
717 EOF is imminent.
718
719 Returns an empty bytes array on EOF.
720
721 Raises BlockingIOError if the underlying raw stream has no
722 data at the moment.
723 """
724 self._unsupported("read")
725
726 def read1(self, size=-1):
727 """Read up to size bytes with at most one read() system call,

Callers 1

_readintoMethod · 0.95

Calls 1

_unsupportedMethod · 0.80

Tested by

no test coverage detected