sanity.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:reframe 作者: eth-cscs 项目源码 文件源码
def findall(patt, filename, encoding='utf-8'):
    """Get all matches of regex ``patt`` in ``filename``.

    :arg patt: The regex pattern to search.
        Any standard Python `regular expression
        <https://docs.python.org/3.6/library/re.html#regular-expression-syntax>`_
        is accepted.
    :arg filename: The name of the file to examine.
    :arg encoding: The name of the encoding used to decode the file.
    :returns: A list of raw `regex match objects
        <https://docs.python.org/3.6/library/re.html#match-objects>`_.
    :raises reframe.core.exceptions.SanityError: In case an :class:`OSError` is
        raised while processing ``filename``.
    """
    return list(evaluate(x) for x in finditer(patt, filename, encoding))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号