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.
精彩评论