how to write special value to a config file with ConfigParser

pavel.starek at gmail.com pavel.starek at gmail.com
Sun Apr 23 13:40:16 EDT 2006


Hi,

I have tried this:

<pre>
import ConfigParser
fp = file("test.conf","w+")
cp = ConfigParser.ConfigParser()
cp.add_section("Section1")
cp.set("Section1","Value1",12345)
cp.write(fp)
</pre>

and works fine for me.




More information about the Python-list mailing list