A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/068632.html below:

how to write file with configparser

how to write file with configparser how to write file with configparserEmile van Sebille emile at fenx.com
Sat Apr 21 10:09:05 EDT 2001
That should work.  Do you have the config.ini elsewhere opened and locked or
perhaps insufficient rights to the file?

--

Emile van Sebille
emile at fenx.com

---------
<hlt2000 at hotmail.com> wrote in message
news:3ae15ddc.7279927 at news.xs4all.nl...
> I,m using the ConfigParser module to read my ini file. After my
> program has ran I want to update the ini file. With configdict.set I
> modify an option to a new value.
>
> How do I write this back onto my file system?
>
> cfgfile=open('config.ini',' rw')
> ...
> cfgdict.set(....)
> ...
> cfgdict.write(cfgfile)
>
> This gives an IOerror: (0,Error)
>
> What is the right way to do this?
>
> TIA,
> Hans



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4