python 3 make subsection for configparser
Question: I'm trying to convert one open source project from Python 2 to Python 3
Project uses configobj module which is not supported for Python 3.

Project uses subsections in config file.

How to realize similar functionality with configparser module?

e.q. configfile.txt is:

    
    
    [General Log]
    filename = log.txt
    [Thread1]
    filename = thread1.txt
    [[log]]
    filename = thread1_log.txt
    

and with this config file i can do like

    
    
    from configparser import ConfigParser
    congfile = ConfigParser()
    configfile.read('configfile.txt')
    
    print(configfile['Thread1']['Log']['filename'])
    

should print thread1_log.txt

is it possible to make new class of configparser class to do this? Any modules
to support this functionality with ython 3


Answer: Per the
[documentation](https://docs.python.org/3.4/library/configparser.html#supported-
ini-file-structure), `ConfigParser` only supports one section level, so
unfortunately you can't do that using the `ConfigParser` library.

If you're using [this `configobj`
module](https://pypi.python.org/pypi/configobj/5.0.6), it says it supports
Python 3. Since you're porting the project from 2 to 3, you might consider
upgrading to the new version of the `configobj` library at the same time.

