Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98702

can ConfigParser deal with repeating section header?

X-Received by 10.66.138.40 with SMTP id qn8mr11928617pab.7.1447343275974; Thu, 12 Nov 2015 07:47:55 -0800 (PST)
X-Received by 10.50.8.68 with SMTP id p4mr350146iga.8.1447343275880; Thu, 12 Nov 2015 07:47:55 -0800 (PST)
Path csiph.com!xmission!news.glorb.com!i2no2197680igv.0!news-out.google.com!f6ni107igq.0!nntp.google.com!i2no845106igv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Thu, 12 Nov 2015 07:47:55 -0800 (PST)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=104.129.194.69; posting-account=tulakwoAAAAxLSovhrdaBjhlSgOSoQnr
NNTP-Posting-Host 104.129.194.69
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <95dc81c4-31eb-4f45-8b9c-20a03b2f0caa@googlegroups.com> (permalink)
Subject can ConfigParser deal with repeating section header?
From John Zhao <johnzzhao@gmail.com>
Injection-Date Thu, 12 Nov 2015 15:47:55 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.python:98702

Show key headers only | View raw


I have a configuration file with repeating sections, for example, 

[INSTANCE]
Name=a

[INSTANCE]
Name=b


I hope I can use ConfigParser to read the file and store the configuration settings in arrays.  

Is that possible?

Thanks a lot.

John

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

can ConfigParser deal with repeating section header? John Zhao <johnzzhao@gmail.com> - 2015-11-12 07:47 -0800
  Re: can ConfigParser deal with repeating section header? Tim Chase <python.list@tim.thechases.com> - 2015-11-12 09:59 -0600
  Re: can ConfigParser deal with repeating section header? amorawski@magna-power.com - 2015-11-12 11:38 -0800

csiph-web