install.py 文件源码

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

项目:azure-cli 作者: Azure 项目源码 文件源码
def create_executable(exec_dir, install_dir):
    create_dir(exec_dir)
    exec_filepath = os.path.join(exec_dir, EXECUTABLE_NAME)
    with open(exec_filepath, 'w') as exec_file:
        exec_file.write(AZ_DISPATCH_TEMPLATE.format(install_dir=install_dir))
    cur_stat = os.stat(exec_filepath)
    os.chmod(exec_filepath, cur_stat.st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
    print_status("The executable is available at '{}'.".format(exec_filepath))
    return exec_filepath
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号