python 读取property文件
在线上写了一个脚本,要定义一些键值对,索性放在property文件里面:
import ConfigParserimport string, os, syscf = ConfigParser.ConfigParser()cf.read("test.conf")s = cf.sections()print 'section:', sfor board in cf.items('board'):print board[0]+'='+board[1]
参考:
http://www.cnblogs.com/sislcb/archive/2008/11/25/1340587.html
http://blog.csdn.net/wayne92/article/details/1802092