[CentralOH] List in config file

Tony Zhu riqemail at gmail.com
Mon Aug 30 22:54:41 CEST 2010


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:

task{
    name=task1
    tools=(tool1
              tool2)
}
task{
    name=task2
    tools=(tool2
             tool3)
}

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
lists.

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?

Thanks

Kunpeng (Tony) Zhu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/mailman/private/centraloh/attachments/20100830/8e22cb3c/attachment.html>


More information about the CentralOH mailing list