ConfigParser Problem
John Abel
johnfabel at btinternet.com
Sun Feb 9 08:28:07 EST 2003
The only way around that, I think, is to have an additional
[engineInfox] for each hostname.
Regards
John
cout wrote:
>How to retrieve hostName from file "config.ini" using ConfigParser?
>
>===============config.ini start===========
>[engineInfo]
>hostName=renderEngine_1
>priority=6
>engineType=XSI_2
>
>hostName=renderEngine_2
>priority=4
>engineType=SI
>===============config.ini end===========
>
>The required INI_INFO["enginInfo"]["hostName"]=["renderEngine_1",
>"renderEngine_2"].
>
>Since the "hostName" repeat twice in section [engineInfo]. It seems
>ConfigParse only returns the last key values.
>
>Any idea?
>
>
>
More information about the Python-list
mailing list