ConfigParser -> Section name through Option value

Sean 'Shaleh' Perry shalehperry at attbi.com
Thu Mar 28 15:24:27 EST 2002


On 28-Mar-2002 domi wrote:
> Hi,
> 
> can somebody help me with this ConfigParser (ini-file) problem:
> Is it possible to get a Section name through an Option value 
> (ConfigParser), e.g.:
> 
> [foo]
> name = python
> ...
> 
> how can I get the section name 'foo' through the option value 'python'?
> Any idea???
> 

doesn't look possible without touching the classes internal data structures. 
The file format is just not meant to be used in this way.

You also seem confused over the term option and section.  'section' refers to
'foo' in your example.  'name' is an option whose value is 'python'.




More information about the Python-list mailing list