I'm using module configparser in Python 2.7.
In my config file, I want the section log to be optional; my parsing module will provide default values if the section does not exist.
My config file looks like this:
[log]
filename = C:/tmp/myapp.log
Is there a method to read values from a section that may be absent from the config file? Method items reads the values, but assumes the section exists and throws an exception if not.