python 2.7的增强配置解析器

python 2.7的增强配置解析器,python,python-2.7,configuration-files,configparser,Python,Python 2.7,Configuration Files,Configparser,我在Python2.7中使用configparser。它缺少一些我需要的关键特性,所以我想知道是否有其他选择 以下是我正在寻找的一些功能: 章节和选项区分大小写 能够参考不同部分的选项。例如: [foo] a = 1 [bar] b = <foo::a> main.ini [hello] a = 1 include my_include.ini [bye] b = <foo::bar> [foo] bar

我在Python2.7中使用configparser。它缺少一些我需要的关键特性,所以我想知道是否有其他选择

以下是我正在寻找的一些功能:

  • 章节和选项区分大小写
  • 能够参考不同部分的选项。例如:

    [foo]
    a = 1
    
    [bar]
    b = <foo::a>
    
  • main.ini

        [hello]
        a = 1
    
        include my_include.ini
        [bye]
        b = <foo::bar>
    
        [foo]
        bar = 1
    
        # this would load my_include1.ini
        include my_include<foo::bar>.ini
    
    main.ini

        [hello]
        a = 1
    
        include my_include.ini
        [bye]
        b = <foo::bar>
    
        [foo]
        bar = 1
    
        # this would load my_include1.ini
        include my_include<foo::bar>.ini
    
    [foo]
    巴=1
    #这将加载我的\u include1.ini
    include my_include.ini
    
  • 能够访问调试信息。例如,它可以打印定义变量的文件的哪一行
  • 有没有具备上述部分/全部功能的产品


    谢谢

    使用ConfigParser可以实现区分大小写。@phd谢谢!对其他项目有什么建议吗?这只是我的意见,但你正在为自己的失败做好准备,沿着这条路走下去。用户只需要获得火箭科学学位就可以配置应用程序,有足够的空间让事情变得异常糟糕。您可以尝试从Python 3.5进行后端口;但它也远不如您所期望的那么先进,我想知道GitPython是否能为您提供
    git config
    format.Case-sensivity的强大功能。可以使用ConfigParser实现Case-sensivity。@phd谢谢!对其他项目有什么建议吗?这只是我的意见,但你正在为自己的失败做好准备,沿着这条路走下去。用户只需要获得火箭科学学位就可以配置应用程序,有足够的空间让事情变得异常糟糕。您可以尝试从Python 3.5进行后端口;但是它也远没有你所期望的那么先进,我想知道GitPython是否能给你提供
    git config
    format的强大功能。