install.py 文件源码

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

项目:deepdrive 作者: vdt 项目源码 文件源码
def main():
    parser = argparse.ArgumentParser(description=None)
    parser.add_argument('-g', '--gtav-dir-only', action='store_true', help='Only install things into the gtav directory')
    args = parser.parse_args()
    logging.basicConfig()
    logger.setLevel(logging.INFO)

    config = utils.get_config()

    if not config:
        default_install_dir = 'C:\\Program Files\DeepDrive'
        install_dir = input('Where would you like to install DeepDrive? (press enter for %s): ' % default_install_dir)
        install_dir = install_dir or default_install_dir
        logger.info('Installing to %s', install_dir)
        config = {'install_dir': install_dir}
        config_dir = os.path.dirname(DEEP_DRIVE_CONFIG_LOCATION)
        if not os.path.exists(config_dir):
            os.makedirs(config_dir)
        with open(DEEP_DRIVE_CONFIG_LOCATION, 'w+') as outfile:
            json.dump(config, outfile, indent=4, sort_keys=True)

    setup(config, args)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号