|
From: Glauco U. <gla...@pr...> - 2011-08-30 08:04:27
|
Il 29/08/2011 19:41, Arash Azarmi ha scritto: > Hi all , > I have 2 questions. > > > 1- I was wondering whats the procedure for reading the value for > subsection, sub-sub section and so on : > > config.cfg file : > > [Header] > User=value > > [[ loop]] > start= startPoint > step= stepPoint > stop= stopPoint > > > > Python Code for reading config file : > > config=configObj(path) > Header = config['Header'] > User = Header['User'] > loop = ?? loop = Header['loop'] > step= ??? step = loop['step'] this is described in the documentation. User is a string (probably) loop is a dictionary > > 2 - how can I have multiple subsections with similar name and keywords > within one section ? > For example having multiple [[loop]] subsections like one is defined > above . multiple "loop" is not possible. this i a keyword. For this use is better an xml. but you can do something similar using [[loop1]] ... [[loop2]] ... and so on. > > -- Glauco Uri Prometeia SpA Via G. Marconi, 43 - 40122 Bologna Via Gonzaga, 7 - 20123 Milano Via Tirso, 26 - 00198 Roma Italia e-mail : gla...@pr... phone : +39 051 6480911 --------------------------------------------------------------------------- Il contenuto e gli allegati di questo messaggio sono strettamente confidenziali, e ne sono vietati la diffusione, la riproduzione e l'uso non autorizzato. Il suo contenuto non costituisce impegno da parte della Società salvo accordo scritto tra quest'ultima ed il destinatario. Qualora il presente messaggio Le fosse pervenuto per errore, La preghiamo di comunicare immediatamente al mittente l'errata ricezione e di distruggere quanto ricevuto (compresi i file allegati) senza farne copia. Qualsivoglia utilizzo non autorizzato del contenuto di questo messaggio costituisce violazione dell'obbligo di non rivelare il contenuto della corrispondenza tra altri soggetti, salvo più grave illecito, ed espone il responsabile alle relative conseguenze. This e-mail (and any attachment(s)) is strictly confidential and for use only by intended recipient(s). Any use, distribution, reproduction or disclosure by any other person is strictly prohibited. The content of this e-mail does not constitute a commitment by the Company except where provided for in a written agreement between this e-mail addressee and the Company. If you are not an intended recipient(s), please notify the sender promptly and destroy this message and its attachments without reading or saving it in any manner. Any non authorized use of the content of this message constitutes a violation of the obligation to abstain from learning of the correspondence among other subjects, except for more serious offence, and exposes the person responsible to the relevant consequences. --------------------------------------------------------------------------- Il contenuto di questa e-mail è rivolto unicamente alle persone alle quali è indirizzato e può contenere informazioni la cui riservatezza è tutelata legalmente. Sono vietati la riproduzione, la diffusione e l’uso di questa e-mail in mancanza di autorizzazione del destinatario. Se avete ricevuto questa e-mail per errore vogliate cortesemente contattarci immediatamente. This e-mail is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Unauthorised reproduction, dissemination or use of this e-mail or of the information herein by anyone other than the intended recipient is prohibited. If you have received this e-mail by mistake, please notify us immediately. |