From the following python code:
import os
from ConfigParser import ConfigParser
from pprint import pprint
c = ConfigParser()
c.read(['test.ini'])
pprint(c.items('test', raw=False, vars=os.environ))
I see the values contained in os.environ as well as in section "test" (in the attached configuration example).
The problem seems to come from the following line:
http://hg.python.org/cpython/file/5395f96588d4/Lib/ConfigParser.py#l605
Which is fixed in py3k but for the 2.x branch has not been modified sin 2002:
http://hg.python.org/cpython/annotate/8bb6003f7f54/Lib/ConfigParser.py#514 |