1、config=ConfigParser.ConfigParser()  

创建ConfigParser实例  

2、config.sections()  

返回配置文件中节序列  

3、config.options(section)  

返回某个项目中的所有键的序列  

4、config.get(section,option)  

返回section节中,option的键值  

5、config.add_section(str)  

添加一个配置文件节点(str)  

6、config.set(section,option,val)  

设置section节点中,键名为option的值(val)  

7、config.read(filename)  

读取配置文件  

8、config.write(obj_file)  

写入配置文件  

相关文章:

  • 2022-12-23
  • 2021-08-23
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2021-12-23
  • 2021-10-23
猜你喜欢
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
相关资源
相似解决方案