[Server-devel] xs-activation and OS update info

Martin Langhoff martin.langhoff at gmail.com
Wed Nov 4 11:09:22 EST 2009


Hi Daniel,

Working on unrelated code, I found that the iniparse module, which we
ship on our F9 and F11 OSs, knows the ordering of the sections.

   from iniparse import INIConfig
   import os
   c = INIConfig(open(os.path.expanduser('~')+'/.sugar/default/config'))
   list(c) # gives you the sections in order

cheers,



m

On Fri, Oct 30, 2009 at 2:33 AM, Daniel Drake <dsd at laptop.org> wrote:
> 2009/10/30 Martin Langhoff <martin.langhoff at gmail.com>:
>> It is about avoiding maintaining a bespoke lib. If you say it is a
>> variant on a python standard lib, do you think we can subclass it? Or
>> is there a reason not to?
>
> Yeah it can probably be subclassed.
>
>>> It is needed up until Python 3.0, unless you know of a python ordered
>>
>> I saw a commend mentioning that something wouldn't be needed w 2.6. On
>> F11 we have 2.6... but maybe I misunderstood.
>
> Ah yes, I forgot the specifics. odict is needed until Python 3.0, but
> Python 2.6 adds the dict_type constructor parameter for ConfigParser
> so MyConfigParser is not needed with python 2.6.
>
> Daniel
>



-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff


More information about the Server-devel mailing list