config.py 文件源码

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

项目:sunbeam 作者: eclarke 项目源码 文件源码
def create_blank_config(conda_fp, project_fp, template="default"):

    if template=="microb120":
        template_stream = pkg_resources.resource_stream(
            "sunbeamlib", "data/microb120_config.yml")
    elif template=="microb191":
        template_stream = pkg_resources.resource_stream(
            "sunbeamlib", "data/microb191_config.yml")
    elif template=="pmacs":
        template_stream = pkg_resources.resource_stream(
            "sunbeamlib", "data/pmacs_config.yml")
    elif template=="respublica":
        template_stream = pkg_resources.resource_stream(
            "sunbeamlib", "data/default_config.yml")
    else:
        sys.stderr.write("Using default config template...\n")
        template_stream = pkg_resources.resource_stream(
            "sunbeamlib", "data/default_config.yml")

    return template_stream.read().decode().format(
        CONDA_FP=conda_fp, PROJECT_FP=project_fp)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号