from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
- This will add to the package's ``__path__`` all subdirectories of directories
- on :data:`sys.path` named after the package. This is useful if one wants to
- distribute different parts of a single logical package as multiple
+ For each directory on :data:`sys.path` that has a subdirectory that matches the
+ package name, add the subdirectory to the package's :attr:`__path__`. This is useful
+ if one wants to distribute different parts of a single logical package as multiple
directories.
It also looks for :file:`\*.pkg` files beginning where ``*`` matches the
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
- This will add to the package's __path__ all subdirectories of
- directories on sys.path named after the package. This is useful
- if one wants to distribute different parts of a single logical
- package as multiple directories.
+ For each directory on sys.path that has a subdirectory that
+ matches the package name, add the subdirectory to the package's
+ __path__. This is useful if one wants to distribute different
+ parts of a single logical package as multiple directories.
It also looks for *.pkg files beginning where * matches the name
argument. This feature is similar to *.pth files (see site.py),