Where to put a configuration file in Python?

前端 未结 7 1767
孤独总比滥情好
孤独总比滥情好 2020-12-22 17:52

In development mode, I have the following directory tree :

| my_project/
| setup.py
| my_project/
    | __init__.py
    | main.py
    | conf/
        | mypro         


        
7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-22 18:16

    The docs for Writing the Setup Script, under section 2.7. Installing Additional Files mention:

    The data_files option can be used to specify additional files needed by the module distribution: configuration files, message catalogs, data files, anything which doesn’t fit in the previous categories.

提交回复
热议问题