package search

boris boris.lorbeer at science-computing.de
Sun Jun 11 09:20:58 EDT 2006


imho wrote:
>
> You just have to put in "__init__.py" in "lib2" (the package directory
> you are "extending"), the following lines:
>
> from pkgutil import extend_path
> __path__ = extend_path(__path__, __name__)
>
> "__path__", in each __init__ module, is a list initialized with the
> module's path, but you can extend it by appending paths where you want
> the interpreter to look for further modules.
> pkgutil.extend_path automatically appends to __path__ all subdirectories
> of directories on sys.path named after the package.
>
> HTH :-)
>
> Diego.

COOL! You just saved me an awful lot of work.

Thanks, Diego!

Boris




More information about the Python-list mailing list