conf.py 文件源码

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

项目:lover 作者: jerluc 项目源码 文件源码
def create_config(project_dir, config_file):
    identifier = get_input('Project idenitifer', default=project_dir)
    name = get_input('Project name', default=project_dir)
    desc = get_input('Project description', default='')
    author = get_input('Your name', default=getpass.getuser())
    love_version = get_input('LOVE version to use',
            default=LATEST_LOVE_VERSION)

    new_config = Configuration({
        'id': identifier,
        'name': name,
        'description': desc,
        'author': author,
        'loveVersion': love_version,
        'targets': [get_current_platform()]
    })

    with open(config_file, 'w') as f:
        f.write(yaml.dump(new_config.as_dict(), default_flow_style=False))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号