Lines Matching defs:read
451 def read(self, size=-1, chars=-1, firstline=False):
457 return. read() will never return more data than requested,
461 bytes or code points to read for decoding. The decoder
463 -1 indicates to read and decode as much as possible. size
470 next call to read().
472 The method should use a greedy read strategy, meaning that
473 it should read as much data as is allowed within the
476 on the stream, these should be read too.
484 # For compatibility with other read() methods that take a
488 # read until we get the required number of characters (if available)
496 newdata = self.stream.read()
498 newdata = self.stream.read(size)
537 read() method.
540 # If we have lines cached from an earlier read, return
556 # If size is given, we call read() only once
558 data = self.read(readsize, firstline=True)
560 # If we're at a "\r" read one extra character (which might
565 data += self.read(size=1, chars=1)
618 data = self.read()
671 work in both read and write modes.
699 def read(self, size=-1):
701 return self.reader.read(size)
767 In the other direction, data is read from the underlying stream using
780 data visible to .read() and .write()) while Reader and Writer
803 def read(self, size=-1):
805 data = self.reader.read(size)
820 data = self.reader.read()
883 The default file mode is 'r', meaning to open the file in read mode.
930 Bytes read from the file are decoded using file_encoding and then