[Baypiggies] configuration parser using python modules?
neilkumar at gmail.com
Sat Jul 14 19:32:45 CEST 2012
I like YAML too. I feel like JSON is only slightly better than XML as
for being human editable (assuming its been pretty printed, otherwise
a huge JSON document can be worse off as far as readability goes
compared to XML) -- as it doesn't allow adding comments (which I think
is very important for configuration files) and it barfs on things like
a trailing comma on a list or hash definitions.
On Sat, Jul 14, 2012 at 8:43 AM, Brent Tubbs <brent.tubbs at gmail.com> wrote:
> My peeve against ConfigParser is that if you want a list of things, you end
> up faking it with some incomplete-looking syntax
> thing1 =
> thing2 =
> That makes me sad. (I'm looking at you, .hgrc.)
> These days all my config files are YAML. You get all the lists and hashes
> that JSON can do, but you can leave out all the quote marks and curly
> braces, which is a big plus for readability.
> On Fri, Jul 13, 2012 at 10:38 PM, Ian Zimmerman <itz at buug.org> wrote:
>> David> app written in Python, some pub-sub stuff written in JS on Node
>> In this case, JSON seems like an obvious choice for a config format :-P
>> Personally, I try to just use eval(read(open(CONFFILE))) whenever
>> remotely possible , guarded against surprises of course.
>> The ConfigParser module is quite unpleasant IMO. Particularly because the
>> natural structure to hold such information is either a dictionary or an
>> object with named fields, but that's not what ConfigParser gives you.
>> Ian Zimmerman
>> gpg public key: 1024D/C6FF61AD
>> fingerprint: 66DC D68F 5C1B 4D71 2EE5 BD03 8A00 786C C6FF 61AD
>> Rule 420: All persons more than eight miles high to leave the court.
>> Baypiggies mailing list
>> Baypiggies at python.org
>> To change your subscription options or unsubscribe:
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
More information about the Baypiggies