Where to put a configuration file in Python?

前端 未结 7 1766
孤独总比滥情好
孤独总比滥情好 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:12

    If you're using setuptools, see the chapter on using non-package data files. Don't try to look for the files yourself.

提交回复
热议问题