1、读取配置文件: 初始化: conf = ConfigParser.ConfigParser()读取文件:conf.read('/home/test')获取配置项: conf.get("node",'pathname') 2、