摘要:
easydict的作用:可以使得以属性的方式去访问字典的值! from easydict import EasyDict as edict # 字典的key就随意,单双引号皆可 d = edict({'foo':3, 'bar':{'x':1, 'y':2}}) d.foo d.bar.x d.fo 阅读全文
摘要:
ConfigParser不仅可以读取配置文件,还可以写入配置文件 首先,命名基本的配置文件: config.ini 本质上: 配置文件包含多个section:[DEFAULT],[bitbucket.org],[topsecret.server.com] 每个section包含若干个键值对,这里的键 阅读全文