Why ConfigParser can't write to file?

Ricky store_li at sina.com
Sat Feb 23 09:14:02 EST 2002


Yes, as you guess, I haven't call .write method, because I was confused by
the usage of write method. It always required a fp object, which I totally
don't what it means. Is it a object create by a=ConfigParser.ConfigParser()
or a file name or a section name?

Please help me! Thank you!


"Graham Ashton" <graz at mindless.com> wrote in message
news:fUJd8.418$PE2.43612 at stones...
> 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