ConfigParser - setting the order of options in a section

Paramjit Oberoi param at cs.wisc.edu
Mon Jan 19 15:26:04 EST 2004


> I am trying unsuccessfully to set the order of options using  the
> set(section,option,value) method ( Python 2.2.2) and writing to a
> file. But the options always appear in a random order. Before each
> option I am writing a comment line using set(section,"#",value) - a
> one line explanation for the option that follows - but the comments
> get re-ordered randomly.

There is a module which was originally written for the SpamBayes
project which probably does what you want. Search Google Groups
for 'UpdatableConfigParser' for details.



More information about the Python-list mailing list