|
From: Michael F. <fuz...@vo...> - 2010-11-17 16:13:22
|
On 14/11/2010 23:23, Jendrik Seipp wrote: > Hello, > first I have to say thank you for such a great tool like configobj! I > can't believe it hasn't made its way into the python stdlib, yet. > > Is there any way to write a configobj to disk sorted by the key names? I > think this would be a very nice feature addition if it doesn't exist. Hello Jendrik, This feature doesn't exist directly and you are the first (that I recall) to request / suggest it. ConfigObj writes out its members honouring their original order in the config file or the order you create them in. However... the order is exposed in the form of two lists - the "scalars" and "sections" members on each section. If you recursively walk the sections of the ConfigObj instance and sort these two lists then you would have a sorted config file. All the best, Michael Foord > Cheers, > Jendrik > > > PS. Please add me to CC. > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop -- http://www.voidspace.org.uk/ |