imcgenutils.py 文件源码

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

项目:imcsdk 作者: CiscoUcs 项目源码 文件源码
def is_binary_in_path(path, binary):
    """
    Checks if the given binary is available in the specified path.

    Returns:
        True or False (Boolean)
    """
    import os

    def is_exe(fpath):
        return os.path.isfile(fpath) and os.access(fpath, os.X_OK)

    path = path.strip('"')
    exe_file = os.path.join(path, binary)
    if is_exe(exe_file):
        return True
    return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号