Python中i使用ini配置文件

时间:2020-07-06 19:45:14   收藏:0   阅读:54

 

 

 

 技术分享图片

 

 

import configparser
cf = configparser.ConfigParser() cf.read(config.ini) # 获取配置文件对象 app_name = cf.get(test-client, "path") # 读取test-client模块下的path变量 获取到的都是字符串


 

原文:https://www.cnblogs.com/tarzen213/p/13256325.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!