Why ConfigParser can't write to file?

Graham Ashton graz at mindless.com
Sat Feb 23 05:14:19 EST 2002


On Fri, 22 Feb 2002 16:36:22 +0000, Ricky wrote:

> I intend to use ConfigParser module to manage my INI file. I can use get
> to retrieve data from my ini file, and use set to change option value in
> Python, just in python, after I closed python, I found that all changes
> I made in python lost. There is nothing altered in my ini file!
> 
> How can I make my ini file to be changed?

As you haven't posted any code I can't be sure, but I suspect from what
you've said that you've not called the write() method on your
ConfigParser object.

Read the module's docs.

-- 
Graham



More information about the Python-list mailing list