Re: [Tutor] Problems with ConfigParser set method

2008-03-08 Thread Andreas Kostyrka
As I thought, it does not fail silently. You need something like: if not parser.has_section("feeds"): parser.add_section("feeds") Andreas Am Samstag, den 08.03.2008, 16:46 + schrieb dave selby: > Hi All, > > I am using the ConfigParser module, I can 'get' from a config file > fine, whe

Re: [Tutor] Problems with ConfigParser set method

2008-03-08 Thread Alan Gauld
"dave selby" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi All, > > I am using the ConfigParser module, I can 'get' from a config file > fine, when I try to set it, it silently fails. the code. > >parser = ConfigParser.SafeConfigParser() >parser.read('./daemon.r

[Tutor] Problems with ConfigParser set method

2008-03-08 Thread dave selby
Hi All, I am using the ConfigParser module, I can 'get' from a config file fine, when I try to set it, it silently fails. the code. parser = ConfigParser.SafeConfigParser() parser.read('./daemon.rc') print parser.get('feeds', 'number') parser.set('feeds', 'number',