ConfigParser vs. import config

前端 未结 4 961
北荒
北荒 2021-02-05 01:42

ConfigParser is the much debated vanilla configuration parser for Python.
However you can simply import config where config.py has python code whic

4条回答
  •  我在风中等你
    2021-02-05 01:47

    This completley depends on your needs and goals for the script. One way really isnt "better", just different. For a very detailed discussion on most of pythons config parsers (including ConfigParser and config modules), see:

    Python Wiki - ConfigParserShootout

提交回复
热议问题