配置文件config.cfg中格式:
name1=aaaaa
name2=bbbbb
python读取:
from configobj import ConfigObj
config = ConfigObj(filename)
name1 = config['name1']
print ("value for name1:", name1)
shell读取:
source filename
echo $name1
配置文件config.cfg中格式:
name1=aaaaa
name2=bbbbb
python读取:
from configobj import ConfigObj
config = ConfigObj(filename)
name1 = config['name1']
print ("value for name1:", name1)
shell读取:
source filename
echo $name1