| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This is the second example for the gitmodules project. However it is just a part of a complex construction with root at gitmodules_example_a.
This project is assumed to be used with the gitmodules dependency
pip install gitmodules
And the gitmodules_example_c should be updated as well
git submodule update --recursive --init
gitmodules_example_c can be executed as a main script but if you will try to import it in any other project as a git submodule you will be forced to append its path to the sys.path:
# in b.py from gitmodules_example_b
import sys
sys.path.append("gitmodules_example_c")
from gitmodules_example_c import cOr you can simply use gitmodules instead:
# in b.py from gitmodules_example_b
import gitmodules
from gitmodules_example_c import cThis method allows you to import git submodule as an ordinary module or as a standard library. So that if you will decide to upload your git submodules to PyPi you will not be forced to change your scripts.
| Back | FazBrowse Home | New Git URL |