(self, b)
return n
Same as _safe_read, but for reading into a buffer.
Same as _safe_read, but for reading into a buffer.
Same as _safe_read but for reading into a buffer .
def _safe_readinto(self, b):
        """Same as _safe_read, but for reading into a buffer."""
        amt = len(b)
        n = self.fp.readinto(b)
        if n < amt:
            raise IncompleteRead(bytes(b[:n]), amt-n)
        return n
def _safe_readinto ( self , b ) : amt = len ( b ) n = self . fp . readinto ( b ) if n < amt : raise IncompleteRead ( bytes ( b [ : n ] ) , amt - n ) return n