• pombredanne's avatar
    Add support to ignore sections conditionally to a Python expression. · 937537a4
    pombredanne authored
    Section titles can now have this form:
     [sectionname:Python expression] # optional comment
    
    If the Python expression evals to False, the section will be ignored.
    
    Expressions have some defaults to support common conditions such as:
     [sectionname: not windows] # ignore this section on windows
    
    Section title lines in the traditional form are still supported of
    course:
     [sectionname] # optional comment 
    or
     [sectionname] ; optional comment 
    937537a4
configparser.py 9.66 KB