util.py 文件源码

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

项目:ziyan 作者: maboss-YCMan 项目源码 文件源码
def get_conf(conf_file_path):
    """read toml conf file for latter use.


    :param conf_file_path: absolute path of conf file.
    :return:a dict contains configured infomation.
    """
    if version_info[0] == 3:
        with open(conf_file_path, encoding='utf-8') as conf_file:
            config = toml.loads(conf_file.read())
    else:
        with open(conf_file_path) as conf_file:
            config = toml.loads(conf_file.read())
    return config
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号