Here is my current directory structure:
proj/ proj/__init__.py proj/submodFolder/ proj/submodFolder/submod/ proj/submodFolder/submod/__init__.py
I am writing a project and I would like to have import submod or even import submodFolder.submod in proj/__init__.py . However, without __init__.py in submodFolder, this will not work.
Suppose subodFolder is a git repository that I have sub-repoed (if you have a third-party library); adding the required __init__.py will break the git subrepo submode and complicate updating libraries from their main repositories.
Assuming submodFolder is the immutable sub-repo of git, what is the best way to push python to the dirtree method of the module? Modifying the python path seemed the closest solution to me, but none of the questions asked already accepted an immutable subodFolder.
Examples are welcome, mark the relative paths.
source share