python 自带读取ini配置文件

import configparser as cp filename = './config.ini' inifile = cp.ConfigParser() inifile.read(filename, 'UTF-8') print(inifile.get('db', 'ip')) # 192.168.1.112
相关文章
相关标签/搜索