Re: [Python-Dev] ConfigParser to save with order

2006-01-20 Thread Tony Meyer
[Tony Meyer] Allowing 'surgical' editing of configuration files, as has been proposed many times both here and c.l.p would not require ConfigParser to be entirely rewritten (just more extensive modification of the write() method). After writing the summary of this thread, I figured I might as

Re: [Python-Dev] ConfigParser to save with order

2006-01-20 Thread Paramjit Oberoi
I think it's moot unless you also preserve comments. Ideally would be something that prserved everything (ordering, blank lines, comments etc.) from how it was read in. Modifying a value should keep its position. Adding a value should add it to the end of the section it's in (unless there are

Re: [Python-Dev] ConfigParser to save with order

2006-01-12 Thread Tony Meyer
I see two paths here: - Rewrite ConfigParser entirely. - Apply my patch. Allowing 'surgical' editing of configuration files, as has been proposed many times both here and c.l.p would not require ConfigParser to be entirely rewritten (just more extensive modification of the write()

Re: [Python-Dev] ConfigParser to save with order

2006-01-11 Thread Facundo Batista
2006/1/11, Tony Meyer [EMAIL PROTECTED]: Remember that there has been a lot of discussion about how ConfigParser should work in the past; for example (ignoring c.l.p): http://mail.python.org/pipermail/python-dev/2004-October/049454.html

Re: [Python-Dev] ConfigParser to save with order

2006-01-10 Thread Tony Meyer
[Guido] I think it's moot unless you also preserve comments. Ideally would be something that prserved everything (ordering, blank lines, comments etc.) from how it was read in. Modifying a value should keep its position. Adding a value should add it to the end of the section it's in (unless

Re: [Python-Dev] ConfigParser to save with order

2006-01-09 Thread Facundo Batista
2006/1/7, Guido van Rossum [EMAIL PROTECTED]: I think it's moot unless you also preserve comments. Ideally would be something that prserved everything (ordering, blank lines, comments etc.) from how it was read in. Modifying a value should keep its position. Adding a value should add it to

Re: [Python-Dev] ConfigParser to save with order

2006-01-09 Thread Fred L. Drake, Jr.
On Monday 09 January 2006 12:08, Facundo Batista wrote: What I wanted to add to the module was predicatibility: a very needed feature when you're writing test cases (and that's where I got bite). In that case, would sorting the keys within each section be sufficient when writing it back out?

Re: [Python-Dev] ConfigParser to save with order

2006-01-09 Thread Facundo Batista
2006/1/9, Fred L. Drake, Jr. [EMAIL PROTECTED]: On Monday 09 January 2006 12:08, Facundo Batista wrote: What I wanted to add to the module was predicatibility: a very needed feature when you're writing test cases (and that's where I got bite). In that case, would sorting the keys within

Re: [Python-Dev] ConfigParser to save with order

2006-01-07 Thread Guido van Rossum
I think it's moot unless you also preserve comments. Ideally would be something that prserved everything (ordering, blank lines, comments etc.) from how it was read in. Modifying a value should keep its position. Adding a value should add it to the end of the section it's in (unless there are