[CentralOH] List in config file
douglas.m.stanley at gmail.com
Mon Aug 30 23:17:52 CEST 2010
On Mon, Aug 30, 2010 at 4:54 PM, Tony Zhu <riqemail at gmail.com> wrote:
> I need to store some tasks configuration in a config file. We had a old
> similar program in perl, which uses the Config::Natural module. By that, the
> config file can be written as:
> There can be more "task" sections, which could be read into an array by the
> perl config module.
> But I tried the "ConfigParser" package in python, it does not support such
> I thought about xml. Of course it can store such data. But the config file
> is supposed to be edited by hand. xml is not so friendly to a notepad. I
> also checked YAML, plists, json. All of them seem to be too complex for my
> simple requirement.
> Does anyone have some python package to recommend?
> Kunpeng (Tony) Zhu
Check out configobj:
It's similar to configparser (in that it uses ini-like files), but
adds things like list support, and nested sections.
Please avoid sending me Word or PowerPoint attachments.
More information about the CentralOH