read up to len bytes and return them, or empty string on EOF

def read(self, len=1024):
        'read up to len bytes and return them, or empty string on EOF'
        return self._with_retry(
                functools.partial(self._read_attempt, len),
                self.gettimeout())