The terminology surrounding imports can get confusing. This glossary should help.
- import hook
- ...
- finder
- An object with a find() method that conforms to PEP 302. May also refer to the class of such an object.
- loader
- An object with a load() method that conforms to PEP 302. May also refer to the class of such an object.
- importer
- Mostly synonymous with path importer.
- path importer
- An object, class, or other code that may be plugged into the PEP 302 import machinery. Often this term refers specifically to those that are used with sys.path_hooks.
- module
- The object generated at the highest level of the import process. In the normal import statement, it is the object bound to the name.
- module name
- The value bound to the __name__ attribute of the corresponding module object. This will be the full qualified name relative to the sys.path value at import time.
- package
- A module corresponding to a directory. The module is populated with the results of evaluating the __init__.py file in the directory. Other .py files and directories in the directory may be imported as submodules of the package.
- namespace package
- A package, possibly without its own module execution, into which subpackages are aggregated according to a single namespace. The “zope” package is a good example.
- package portion
- ...