utils.py 文件源码

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

项目:conda-tools 作者: groutr 项目源码 文件源码
def is_executable(mode):
    """
    Check if mode is executable

    Mode can be specified in octal or as an int.
    """
    if isinstance(mode, str) and mode.startswith('0o'):
        mode = int(mode, 8)

    ux, gx, ox = stat.S_IXUSR, stat.S_IXGRP, stat.S_IXOTH

    return ((mode & ux) or (mode & gx) or (mode & ox)) > 0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号