编写.ini文件

来源:互联网 发布:淘宝买家退货调包报警 编辑:程序博客网 时间:2024/04/30 02:59
from ConfigParser import RawConfigParser as rcp  if __name__ == "__main__":     cfg = rcp()     cfg.add_section("Info")     cfg.set("Info", "ImagePath", "f:/whu")     cfg.set("Info", "foo", "cd's information")     cfg.write(open("f:/Whu/try.ini","w")) # #[Info] #imagepath = f:/whu #foo = cd's information 
本文章来至源码世界   http://www.ymsky.net/views/35797.shtml
0 0
原创粉丝点击