问题:
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. 想象一下,您想用Python开发一个平凡的最终用户桌面(非Web)应用程序。 What is the best way to structure the project's folder hierarchy? 构造项目文件夹层次结构的最佳方法是什么? web
Desirable features are ease of maintenance, IDE-friendliness, suitability for source control branching/merging, and easy generation of install packages. 理想的功能是易于维护,IDE友好,适用于源代码控制分支/合并以及易于生成安装软件包。 app
In particular: 尤为是: 测试
- Where do you put the source? 您将源放在哪里?
- Where do you put application startup scripts? 您将应用程序启动脚本放在哪里?
- Where do you put the IDE project cruft? 您将IDE项目放在哪里?
- Where do you put the unit/acceptance tests? 您将单元/验收测试放在哪里?
- Where do you put non-Python data such as config files? 您将非Python数据(例如配置文件)放在哪里?
- Where do you put non-Python sources such as C++ for pyd/so binary extension modules? 您将pyd / so二进制扩展模块的非Python源代码(例如C ++)放在哪里?
解决方案:
参考一:
https://stackoom.com/question/oFV/Python应用程序的最佳项目结构是什么-关闭
参考二:
https://oldbug.net/q/oFV/What-is-the-best-project-structure-for-a-Python-application-closed