From: bhowes at cssun3.corp.mot.com (Brad Howes)
Date: 12 Apr 1999 13:22:44 -0700
Subject: ConfigParser module and alternatives (flad, flan)
References: <19990331160323.21601.00000471@ng-fi1.aol.com> <7du3ab$3ag@chronicle.concentric.net> <jtaewsfmlj.fsf@wazor.biostat.wisc.edu> <xcxP2.1302$rd2.27684@news14.ispnews.com> <371219E9.9EA91839@home.com>
Message-ID: <wjylnfx37xn.fsf@cssun3.corp.mot.com>
Content-Length: 1103
X-UID: 900                                                  

>>>> Thus spake 'Jim Meier (fatjim at home.com)':

 JM> Mike Orr wrote:

 >> I'm not sure if I'll use ConfigParser for the next version.  I don't
 >> really need the sections (multiple files work just fine, using the filename
 >> for the section name), and I haven't found a use for the the %(other_key)s
 >> substitutions.  On the other hand, it doesn't handle multiple values (the
 >> same key repeated within a record), which I sometimes need.
 >> 
 >> Attached is a wrapper class for ConfigParser which supports booleans
 >> and can also return an entire section as a dictionary (or all the sections
 >> as nested dictionaries).  I find these make it a little more convenient.
 >> 

 JM> Why not simply use a file of python expressions? Like this:

Or classes (which is what I've used in several apps):

  class Section1:
      key1 = [ 1, 2, 3, 'value', [ 'useful, 'nesting', 'eh?' ] ]
      key2 = 'anotherval'

-- 
Brad Howes                           bhowes at motorola.com
Principal Compass Hacker             Work: +1 602 446 5219
Motorola                             Cell: +1 602 768 0735




