See :meth:`PunchParser.read`
557965
def read(self, line, f, data):
        """"""
        line = f.readline()
        assert(line == " $HESS\n")
        while line != " $END\n":
            line = f.readline()
1211889
def __read(self, i: int) -> bytes:
        """"""
        b = self.data[self.idx: self.idx + i]
        self.idx += i
        if len(b) != i:
            raise bencodepy.DecodingError(
                "Incorrect byte length returned between indexes of {0} and {1}. Possible unexpected End of File."
                    .format(str(self.idx), str(self.idx - i)))
        return b
1145921
def read_input(buf, has_header = True):
    """"""

    # Use stdin if there is no supplied buffer
    if buf is None:
        buf = sys.stdin

    # Attempt to read a header if necessary
    header = {}
    if has_header:
        # Until we get a blank line, read "attr:val" lines, 
        # setting the values in 'header'
        last_attr = None
        while True:
            line = buf.readline()

            # remove lastcharacter (which is a newline)
            line = line[:-1] 

            # When we encounter a newline, we are done with the header
            if len(line) == 0:
                break

            colon = line.find(':')

            # If we can't find a colon, then it might be that we are
            # on a new line, and it belongs to the previous attribute
            if colon < 0:
                if last_attr:
                    header[last_attr] = header[last_attr] + '\n' + urllib.parse.unquote(line)
                else:
                    continue

            # extract it and set value in settings
            last_attr = attr = line[:colon]
            val  = urllib.parse.unquote(line[colon+1:])
            header[attr] = val

    return buf, header
454290
def read(cls, f):
    """"""
    url = None

    line = f.readline()
    if not line:
      # EOF
      return None
    while not line.startswith(cls.LENGTH_HEADER):
      if line.startswith(cls.URI_HEADER):
        url = line[len(cls.URI_HEADER):].strip()
      line = f.readline()

    # Consume empty separator
    f.readline()

    # Read content
    length = int(line.split(':')[1])

    return cls(url, length)
1299191
def read(self, num_bytes=None):
        """"""
        res = self.get_next(num_bytes)
        self.skip(len(res))
        return res
1271997
def readinto(self, b):
        """"""
        if self.connected is None:
            return None

        # Extract requested amount of data from the read buffer.
        b[:] = self._get_input(size)

        if len(b):
            return len(b)
        else:
            return None
1367663
def read(handle, bytes):
        
        return Zchunk(lib.zchunk_read(coerce_py_file(handle), bytes), True)
506267
def read(cls, source, *args, **kwargs):
    
    # if reading a cache, read it now and sieve
    if io_cache.is_cache(source):
        from .cache import preformat_cache
        source = preformat_cache(source, *args[1:],
                                 start=kwargs.get('start'),
                                 end=kwargs.get('end'))

    # get join arguments
    pad = kwargs.pop('pad', None)
    gap = kwargs.pop('gap', 'raise' if pad is None else 'pad')
    joiner = _join_factory(cls, gap, pad)

    # read
    return io_read_multi(joiner, cls, source, *args, **kwargs)
766476
def reads(s, filename, loader, implicit_tuple, allow_errors):
  """"""
  try:
    the_context.filename = filename
    the_context.loader = loader

    grammar = make_grammar(allow_errors=allow_errors)
    root = grammar.start_tuple if implicit_tuple else grammar.start

    return root.parseWithTabs().parseString(s, parseAll=True)[0]
  except (p.ParseException, p.ParseSyntaxException) as e:
    loc = SourceLocation(s, find_offset(s, e.lineno, e.col))
    raise exceptions.ParseError(the_context.filename, loc, e.msg)
578112
def _read(self, fd, mask):
        """"""
        try:
            # if EOF was encountered on a tty, avoid reading again because
            # it actually requests more data
            if select.select([fd],[],[],0)[0]:
                snew = os.read(fd, self.nbytes) # returns bytes in PY3K
                if PY3K: snew = snew.decode('ascii','replace')
                self.value.append(snew)
                self.nbytes -= len(snew)
            else:
                snew = ''
            if (self.nbytes <= 0 or len(snew) == 0) and self.widget:
                # stop the mainloop
                self.widget.quit()
        except OSError:
            raise IOError("Error reading from %s" % (fd,))
751941
def read( handle, id=None ):
    

    from Bio.PDB import PDBParser
    
    if not id:
        id = os.path.basename(handle).split('.')[0] # Get from filename
    
    p = PDBParser()
    s = p.get_structure(id, handle)

    return s
1301768
def read(self, *args, **kwargs):
        
        with self.open('r') as f:
            return f.read(*args, **kwargs)
408774
def read_until(self, terminator):
        

        lines = []
        term = terminator + b'\n'
        while True:
            line = self.input.readline()
            if line == term:
                break
            else:
                lines.append(line)
        return b''.join(lines)
293182
def read(self, filehandle):
        """"""
        return self.__import(json.load(filehandle, **self.kwargs))
1029036
def read(self):
        
        if self.lines and self.chunksize:
            obj = concat(self)
        elif self.lines:

            data = to_str(self.data)
            obj = self._get_object_parser(
                self._combine_lines(data.split('\n'))
            )
        else:
            obj = self._get_object_parser(self.data)
        self.close()
        return obj
1043358
def _read(self):
        
        if self._dask:
            d = da.from_delayed(
                delayed(read_from_bpch, )(
                    self.filename, self.file_position, self.shape,
                    self.dtype, self.endian, use_mmap=self._mmap
                ),
                self.shape, self.dtype
            )
        else:
            d = read_from_bpch(
                    self.filename, self.file_position, self.shape,
                    self.dtype, self.endian, use_mmap=self._mmap
            )

        return d
1332650
private boolean readLine() throws ParseException {
        try {
            return parser.Line();
        } catch (ParseException e) {
            yield();
            if ( EOF )
                return true;
            throw e;
        }
    }