开发者

In python, how to have a 'run' subpackage in a directory?

I would prefer to have the structure to look like:

Overall_Package/

__init__.py

run_package/{

__init__.py
run__subpackage1.py
run_subpackage2.py
run_subpackage3.py
...
}

code package/ {

Basic_code_package_that_is_used_in_many_if_not_all_the_sub_packages
Sub_package1
subpackage2
....
}

I cannot use relative imports as they are in the same overall package, but I need a stru开发者_Python百科cture similar to this for easy downloading.


I'm not quite sure I follow your question and what is it exactly you want. Do you need to distribute this and would like it to have that structure? If so you can always use setuptools or distutils and install your package with it's structure to python's site-packages directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜