Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'parser': 0.07; 'subject:file': 0.07; 'tarek': 0.07; 'ex:': 0.09; 'friday,': 0.09; 'logic': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python- list': 0.10; 'sections': 0.13; 'other:': 0.16; 'ziad\xe9': 0.16; 'wrote:': 0.17; 'config': 0.17; 'parameters': 0.20; 'all,': 0.21; 'bit': 0.21; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'values': 0.26; 'am,': 0.27; 'file': 0.32; 'structure': 0.32; 'could': 0.32; 'received:google.com': 0.34; 'received:209.85': 0.35; 'there': 0.35; 'add': 0.36; 'but': 0.36; 'subject:with': 0.36; 'october': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'sure': 0.38; 'help': 0.40; 'from:no real name:2**0': 0.60; 'skip:u 10': 0.60; 'link': 0.60; 'back': 0.62; 'configparser': 0.84 Newsgroups: comp.lang.python Date: Fri, 19 Oct 2012 03:22:37 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=115.111.146.130; posting-account=nkPncwoAAACGafyLFq6KyMZrJB-Rj4il References: User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 115.111.146.130 MIME-Version: 1.0 Subject: Re: section with in a section config file and reading that config file From: narasimha18sv@gmail.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 82 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1350642167 news.xs4all.nl 6984 [2001:888:2000:d::a6]:36463 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:31733 On Friday, 19 October 2012 15:39:57 UTC+5:30, Tarek Ziad=E9 wrote: > On 10/19/12 11:51 AM, kampy wrote: >=20 > > hi all, >=20 > > my requirement is to have section with in a section in config parameter= s >=20 > > ex: >=20 > > [AAA] >=20 > > [BBB] >=20 > > a=3D1 >=20 > > b=3D1 >=20 > > [CCC] >=20 > > a=3D1 >=20 > > b=3D2 >=20 > > Any one help me in understanding how to make sure that config file to = have a structure like this and reading with the config parser >=20 > a configuration file is a flat sequences of sections, you cannot do this >=20 >=20 >=20 > what you could do is have 2 files, and add a link from one to the other: >=20 >=20 >=20 >=20 >=20 > file1.ini: >=20 >=20 >=20 > [AAA] >=20 > extended =3D file2.ini >=20 >=20 >=20 > file2.ini: >=20 >=20 >=20 > [BBB] >=20 > a=3D1 >=20 > b=3D1 >=20 >=20 >=20 > [CCC] >=20 > a=3D1 >=20 > b=3D2 >=20 >=20 >=20 >=20 >=20 > then create a bit of logic on the top of ConfigParser to read back those= =20 >=20 > values >=20 >=20 >=20 > HTH >=20 > Tarek yes but it is not only for one structure like above there will be many sect= ions like that