Try to read README.rst or return empty string if failed.

    :return: File contents.
    :rtype: str
184427
def readme():
    
    path = os.path.realpath(os.path.join(os.path.dirname(__file__), 'README.rst'))
    handle = None
    url_prefix = 'https://raw.githubusercontent.com/Robpol86/{name}/v{version}/'.format(name=NAME, version=VERSION)
    try:
        handle = codecs.open(path, encoding='utf-8')
        return handle.read(131072).replace('.. image:: docs', '.. image:: {0}docs'.format(url_prefix))
    except IOError:
        return ''
    finally:
        getattr(handle, 'close', lambda: None)()
295781
def get_long_description():
    
    import codecs 
    with codecs.open('README.rst', encoding='UTF-8') as f:
        readme = [line for line in f if not line.startswith('.. contents::')]
        return ''.join(readme)
1139793
def readText (self, filename=None):
    
    if filename is None:
      filename = self.pathname

    self.header = { }
    inBody      = False

    with open(filename, 'rt') as stream:
      for (lineno, line) in enumerate(stream.readlines()):
        stripped = line.strip()
        if stripped == '':
          continue
        elif stripped.startswith('#'):
          if not inBody:
            self._parseHeader(line, lineno, self.log)
        else:
          inBody = True
          self.lines.append( SeqCmd.parse(line, lineno, self.log, self.cmddict) )

    if 'seqid' in self.header:
      self.seqid = self.header['seqid']
    elif self.seqid is None:
      self.log.error('No sequence id present in header.')

    if 'version' in self.header:
      self.version = self.header['version']
    elif self.version is None:
      self.log.warning('No version present in header.  Defaulting to zero (0).')
      self.version = 0
186660
def read_file(file_path, mode = 'rt'):
    
    contents = ''
    with open(file_path, mode) as f:
        contents = f.read()
    return contents
562612
def read_file(self, url, location=None):
        
        response = requests_retry_session().get(url, timeout=10.0)
        response.raise_for_status()
        text = response.text
        if 'tab-width' in self.options:
            text = text.expandtabs(self.options['tab-width'])

        return text.splitlines(True)
135318
def _get_file_content(self, path):
        """"""
        with open(path, 'r') as file_:
            content = file_.read()
        return content
931489
def _read_files(files):
    
    file_contents = [
        (
            _parse_title(file_path),
            _read_file(file_path),
        )
        for file_path in files
    ]
    return file_contents
65682
def get_long_description(self, filename='README.md'):
        
        try:
            import pypandoc
            description = pypandoc.convert_file('README.md', 'rst', 'md')
        except (IOError, ImportError):
            description = open("README.md").read()
        return description
222541
def read_readme():
    
    text = open("README.rst", "rt").read()
    text_lines = text.split("\n")
    ld_i_beg = 0
    while text_lines[ld_i_beg].find("start long description") < 0:
        ld_i_beg += 1
    ld_i_beg += 1
    ld_i_end = ld_i_beg
    while text_lines[ld_i_end].find("end long description") < 0:
        ld_i_end += 1

    ld_text = "\n".join(text_lines[ld_i_beg:ld_i_end])

    return ld_text
233347
def parse_readme():
    """"""
    # Get the long description from the relevant file
    readme_file = str(Path(__file__).parent / 'README.rst')
    with codecs.open(readme_file, encoding='utf-8') as handle:
        long_description = handle.read()

    return long_description
493370
def read_whole_file(self):
        
        chunk = None
        with open(self.path, 'rb') as infile:
            chunk = infile.read()
        return chunk
518917
def get_long_description():
    

    with open(
        os.path.join(BASE_DIRECTORY, 'README.md'),
        'r',
        encoding='utf-8'
    ) as readme_file:
        return readme_file.read()
637933
def read_content (self):
        """"""
        if self.is_directory():
            data = get_index_html(get_files(self.get_os_filename()))
            if isinstance(data, unicode):
                data = data.encode("iso8859-1", "ignore")
        else:
            data = super(FileUrl, self).read_content()
        return data
1129173
def get_content(self, r):
        """"""
        if self.type == 'exp_file':
            # don't use the decoded r.text
            return r.content
        elif self.type == 'version':
            return r.content
        else:
            if self.fmt == 'json':
                content = {}
                # Decode
                try:
                    # Watch out for bad/empty json
                    content = json.loads(r.text, strict=False)
                except ValueError as e:
                    if not self.expect_empty_json():
                        # reraise for requests that shouldn't send empty json
                        raise ValueError(e)
                finally:
                    return content
            else:
                return r.text
501661
def _read_file(self, file):  # type: (str) -> Optional[str]
        
        if not self.setup_file_name:
            return None
        source = None
        if os.path.isfile(file):
            with self.file_opener.open_this(file, "r") as setup_py:
                source = setup_py.read()
        return source
507769
def get_long_description():
    
    here = path.abspath(path.dirname(__file__))
    with open(path.join(here, 'README.rst')) as readme:
        return readme.read()
    return None
702995
def get_long_description():
    
    with codecs.open(os.path.join(here, "README.rst"), "r", "utf-8") as f:
        return f.read()