(self, findrange)
return out
Read until a character from a given range is found.
Read until a character from a given range is found.
Read until a character from a given range is found .
def read_to(self, findrange):
        """Read until a character from a given range is found."""
        out = b''
        while True:
            d = self.read(1)
            if d == b'':
                break
            if d in findrange:
                break
            out += d
        self.seek(-len(d), 1)
        return out
def read_to ( self , findrange ) : out = b'' while True : d = self . read ( 1 ) if d == b'' : break if d in findrange : break out += d self . seek ( - len ( d ) , 1 ) return out