M
Matthew Wilson
I'm using ConfigParser to store and retreive some data across multiple
runs of my program and it looks like it automatically lower-cases my
options:
---this is the program:
import ConfigParser
cp = ConfigParser.ConfigParser()
cp.add_section('info')
cp.set('info', 'Previous-IP', '0.0.0.0')
out = open('out.txt', 'w')
cp.write(out)
out.close()
out = open('out.txt')
print out.read()
---here is the data:
[info]
previous-ip = 0.0.0.0
---end
I wonder if this is something intentionally built-in to ConfigParser in
order to remove case-sensitivity issues that are variable across
platforms. Does anyone else have any comments or ideas? I don't need
case-sensitivity in my script, but I am puzzled by this behavior.
runs of my program and it looks like it automatically lower-cases my
options:
---this is the program:
import ConfigParser
cp = ConfigParser.ConfigParser()
cp.add_section('info')
cp.set('info', 'Previous-IP', '0.0.0.0')
out = open('out.txt', 'w')
cp.write(out)
out.close()
out = open('out.txt')
print out.read()
---here is the data:
[info]
previous-ip = 0.0.0.0
---end
I wonder if this is something intentionally built-in to ConfigParser in
order to remove case-sensitivity issues that are variable across
platforms. Does anyone else have any comments or ideas? I don't need
case-sensitivity in my script, but I am puzzled by this behavior.