ConfigParser Problem

cout cout at netvigator.com
Sun Feb 9 06:37:04 EST 2003


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