[Baypiggies] configuration parser using python modules?

Ian Zimmerman itz at buug.org
Sat Jul 14 07:38:56 CEST 2012


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
http://www.gravatar.com/avatar/c66875cda51109f76c6312f4d4743d1e.png
Rule 420: All persons more than eight miles high to leave the court.


More information about the Baypiggies mailing list