【python】读取配置文件

前提:import ConfigParser

cf=ConfigParser.ConfigParser()

读取配置文件

cf.read("../config.ini")

获取某个区域的key对应的value值

cf.get('server_info','ip')

猜你喜欢

转载自blog.csdn.net/leftAright/article/details/84639234