Lines Matching refs:amt
450 def read(self, amt=None): argument
459 return self._read_chunked(amt)
461 if amt is not None:
462 if self.length is not None and amt > self.length:
464 amt = self.length
465 s = self.fp.read(amt)
466 if not s and amt:
577 def _read_chunked(self, amt=None): argument
586 if amt is not None and amt <= chunk_left:
587 value.append(self._safe_read(amt))
588 self.chunk_left = chunk_left - amt
592 if amt is not None:
593 amt -= chunk_left
623 def _safe_read(self, amt): argument
630 data = self.fp.read(amt)
631 if len(data) < amt:
632 raise IncompleteRead(data, amt-len(data))
637 amt = len(b)
639 if n < amt:
640 raise IncompleteRead(bytes(b[:n]), amt-n)