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
相關文章
相關標籤/搜索