René's URL Explorer Experiment
go
Title:
5. The import system — Python 3.4.10 documentation
direct link
Domain:
docs.python.org
None
text/html; charset=utf-8
Links
:
Python documentation for the current stable release
https://docs.python.org/3/reference/import.html
index
https://docs.python.org/3.4/genindex.html
modules
https://docs.python.org/3.4/py-modindex.html
next
https://docs.python.org/3.4/reference/expressions.html
previous
https://docs.python.org/3.4/reference/executionmodel.html
Python
https://www.python.org/
3.4.10 Documentation
https://docs.python.org/3.4/index.html
The Python Language Reference
https://docs.python.org/3.4/reference/index.html
¶
https://docs.python.org/3.4/reference/import.html#the-import-system
module
https://docs.python.org/3.4/glossary.html#term-module
importing
https://docs.python.org/3.4/glossary.html#term-importing
import
https://docs.python.org/3.4/reference/simple_stmts.html#import
importlib.import_module()
https://docs.python.org/3.4/library/importlib.html#importlib.import_module
__import__()
https://docs.python.org/3.4/library/functions.html#__import__
import
https://docs.python.org/3.4/reference/simple_stmts.html#import
import
https://docs.python.org/3.4/reference/simple_stmts.html#import
__import__()
https://docs.python.org/3.4/library/functions.html#__import__
__import__()
https://docs.python.org/3.4/library/functions.html#__import__
import
https://docs.python.org/3.4/reference/simple_stmts.html#import
import
https://docs.python.org/3.4/reference/simple_stmts.html#import
__import__()
https://docs.python.org/3.4/library/functions.html#__import__
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
import
https://docs.python.org/3.4/reference/simple_stmts.html#import
__import__()
https://docs.python.org/3.4/library/functions.html#__import__
__import__()
https://docs.python.org/3.4/library/functions.html#__import__
importlib.import_module()
https://docs.python.org/3.4/library/importlib.html#importlib.import_module
[1]
https://docs.python.org/3.4/reference/import.html#fnmo
ImportError
https://docs.python.org/3.4/library/exceptions.html#ImportError
PEP 302
http://www.python.org/dev/peps/pep-0302
sys.meta_path
https://docs.python.org/3.4/library/sys.html#sys.meta_path
PEP 420
http://www.python.org/dev/peps/pep-0420
importlib
https://docs.python.org/3.4/library/importlib.html#module-importlib
¶
https://docs.python.org/3.4/reference/import.html#importlib
importlib
https://docs.python.org/3.4/library/importlib.html#module-importlib
importlib.import_module()
https://docs.python.org/3.4/library/importlib.html#importlib.import_module
__import__()
https://docs.python.org/3.4/library/functions.html#__import__
importlib
https://docs.python.org/3.4/library/importlib.html#module-importlib
¶
https://docs.python.org/3.4/reference/import.html#packages
packages
https://docs.python.org/3.4/glossary.html#term-package
sys
https://docs.python.org/3.4/library/sys.html#module-sys
email
https://docs.python.org/3.4/library/email.html#module-email
email.mime
https://docs.python.org/3.4/library/email.mime.html#module-email.mime
¶
https://docs.python.org/3.4/reference/import.html#regular-packages
regular packages
https://docs.python.org/3.4/glossary.html#term-regular-package
namespace packages
https://docs.python.org/3.4/glossary.html#term-namespace-package
¶
https://docs.python.org/3.4/reference/import.html#namespace-packages
portions
https://docs.python.org/3.4/glossary.html#term-portion
sys.path
https://docs.python.org/3.4/library/sys.html#sys.path
PEP 420
http://www.python.org/dev/peps/pep-0420
¶
https://docs.python.org/3.4/reference/import.html#searching
fully qualified
https://docs.python.org/3.4/glossary.html#term-qualified-name
import
https://docs.python.org/3.4/reference/simple_stmts.html#import
importlib.import_module()
https://docs.python.org/3.4/library/importlib.html#importlib.import_module
__import__()
https://docs.python.org/3.4/library/functions.html#__import__
ImportError
https://docs.python.org/3.4/library/exceptions.html#ImportError
¶
https://docs.python.org/3.4/reference/import.html#the-module-cache
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
ImportError
https://docs.python.org/3.4/library/exceptions.html#ImportError
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
ImportError
https://docs.python.org/3.4/library/exceptions.html#ImportError
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
importlib.reload()
https://docs.python.org/3.4/library/importlib.html#importlib.reload
¶
https://docs.python.org/3.4/reference/import.html#finders-and-loaders
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
finders
https://docs.python.org/3.4/glossary.html#term-finder
loaders
https://docs.python.org/3.4/glossary.html#term-loader
importers
https://docs.python.org/3.4/glossary.html#term-importer
import path
https://docs.python.org/3.4/glossary.html#term-import-path
import path
https://docs.python.org/3.4/glossary.html#term-import-path
loaders
https://docs.python.org/3.4/glossary.html#term-loader
¶
https://docs.python.org/3.4/reference/import.html#import-hooks
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
sys.path
https://docs.python.org/3.4/library/sys.html#sys.path
sys.meta_path
https://docs.python.org/3.4/library/sys.html#sys.meta_path
sys.path
https://docs.python.org/3.4/library/sys.html#sys.path
sys.path_hooks
https://docs.python.org/3.4/library/sys.html#sys.path_hooks
¶
https://docs.python.org/3.4/reference/import.html#the-meta-path
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
sys.meta_path
https://docs.python.org/3.4/library/sys.html#sys.meta_path
find_spec()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.MetaPathFinder.find_spec
sys.meta_path
https://docs.python.org/3.4/library/sys.html#sys.meta_path
ImportError
https://docs.python.org/3.4/library/exceptions.html#ImportError
find_spec()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.MetaPathFinder.find_spec
ImportError
https://docs.python.org/3.4/library/exceptions.html#ImportError
sys.meta_path
https://docs.python.org/3.4/library/sys.html#sys.meta_path
import path
https://docs.python.org/3.4/glossary.html#term-import-path
path based finder
https://docs.python.org/3.4/glossary.html#term-path-based-finder
find_spec()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.MetaPathFinder.find_spec
find_module()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.MetaPathFinder.find_module
¶
https://docs.python.org/3.4/reference/import.html#loading
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
later section
https://docs.python.org/3.4/reference/import.html#import-mod-attrs
[2]
https://docs.python.org/3.4/reference/import.html#fnlo
importlib.abc.Loader.load_module()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.Loader.load_module
¶
https://docs.python.org/3.4/reference/import.html#loaders
importlib.abc.Loader.exec_module()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.Loader.exec_module
exec_module()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.Loader.exec_module
ImportError
https://docs.python.org/3.4/library/exceptions.html#ImportError
exec_module()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.Loader.exec_module
find_spec()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.MetaPathFinder.find_spec
create_module()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.Loader.create_module
load_module()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.Loader.load_module
exec_module()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.Loader.exec_module
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
importlib.reload()
https://docs.python.org/3.4/library/importlib.html#importlib.reload
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
¶
https://docs.python.org/3.4/reference/import.html#submodules
¶
https://docs.python.org/3.4/reference/import.html#module-spec
ModuleSpec
https://docs.python.org/3.4/library/importlib.html#importlib.machinery.ModuleSpec
¶
https://docs.python.org/3.4/reference/import.html#import-related-module-attributes
¶
https://docs.python.org/3.4/reference/import.html#__name__
¶
https://docs.python.org/3.4/reference/import.html#__loader__
¶
https://docs.python.org/3.4/reference/import.html#__package__
PEP 366
http://www.python.org/dev/peps/pep-0366
PEP 366
http://www.python.org/dev/peps/pep-0366
¶
https://docs.python.org/3.4/reference/import.html#__spec__
modules initialized during interpreter startup
https://docs.python.org/3.4/reference/toplevel_components.html#programs
set to None in some cases
https://docs.python.org/3.4/reference/import.html#main-spec
¶
https://docs.python.org/3.4/reference/import.html#__path__
below
https://docs.python.org/3.4/reference/import.html#package-path-rules
¶
https://docs.python.org/3.4/reference/import.html#__file__
¶
https://docs.python.org/3.4/reference/import.html#__cached__
PEP 3147
http://www.python.org/dev/peps/pep-3147
¶
https://docs.python.org/3.4/reference/import.html#module-path
sys.path
https://docs.python.org/3.4/library/sys.html#sys.path
sys.path
https://docs.python.org/3.4/library/sys.html#sys.path
sys.path
https://docs.python.org/3.4/library/sys.html#sys.path
sys.path_hooks
https://docs.python.org/3.4/library/sys.html#sys.path_hooks
PEP 420
http://www.python.org/dev/peps/pep-0420
PEP 420
http://www.python.org/dev/peps/pep-0420
¶
https://docs.python.org/3.4/reference/import.html#module-reprs
loader.module_repr()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.Loader.module_repr
module_repr()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.Loader.module_repr
¶
https://docs.python.org/3.4/reference/import.html#the-path-based-finder
path based finder
https://docs.python.org/3.4/glossary.html#term-path-based-finder
PathFinder
https://docs.python.org/3.4/library/importlib.html#importlib.machinery.PathFinder
import path
https://docs.python.org/3.4/glossary.html#term-import-path
path entries
https://docs.python.org/3.4/glossary.html#term-path-entry
zipimport
https://docs.python.org/3.4/library/zipimport.html#module-zipimport
path entry finder
https://docs.python.org/3.4/glossary.html#term-path-entry-finder
meta path finder
https://docs.python.org/3.4/glossary.html#term-meta-path-finder
path entry finder
https://docs.python.org/3.4/glossary.html#term-path-entry-finder
sys.meta_path
https://docs.python.org/3.4/library/sys.html#sys.meta_path
sys.meta_path
https://docs.python.org/3.4/library/sys.html#sys.meta_path
¶
https://docs.python.org/3.4/reference/import.html#path-entry-finders
path based finder
https://docs.python.org/3.4/glossary.html#term-path-based-finder
path entry
https://docs.python.org/3.4/glossary.html#term-path-entry
path based finder
https://docs.python.org/3.4/glossary.html#term-path-based-finder
find_spec()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.MetaPathFinder.find_spec
import path
https://docs.python.org/3.4/glossary.html#term-import-path
path based finder
https://docs.python.org/3.4/glossary.html#term-path-based-finder
sys.path
https://docs.python.org/3.4/library/sys.html#sys.path
sys.path_hooks
https://docs.python.org/3.4/library/sys.html#sys.path_hooks
sys.path_importer_cache
https://docs.python.org/3.4/library/sys.html#sys.path_importer_cache
sys.path
https://docs.python.org/3.4/library/sys.html#sys.path
sys.path
https://docs.python.org/3.4/library/sys.html#sys.path
site
https://docs.python.org/3.4/library/site.html#module-site
sys.path
https://docs.python.org/3.4/library/sys.html#sys.path
path entry finders
https://docs.python.org/3.4/glossary.html#term-path-entry-finder
path based finder
https://docs.python.org/3.4/glossary.html#term-path-based-finder
meta path finder
https://docs.python.org/3.4/glossary.html#term-meta-path-finder
import path
https://docs.python.org/3.4/glossary.html#term-import-path
find_spec()
https://docs.python.org/3.4/library/importlib.html#importlib.machinery.PathFinder.find_spec
find_spec()
https://docs.python.org/3.4/library/importlib.html#importlib.machinery.PathFinder.find_spec
sys.path
https://docs.python.org/3.4/library/sys.html#sys.path
path entry finder
https://docs.python.org/3.4/glossary.html#term-path-entry-finder
PathEntryFinder
https://docs.python.org/3.4/library/importlib.html#importlib.abc.PathEntryFinder
sys.path_importer_cache
https://docs.python.org/3.4/library/sys.html#sys.path_importer_cache
importer
https://docs.python.org/3.4/glossary.html#term-importer
path entry
https://docs.python.org/3.4/glossary.html#term-path-entry
path entry finder
https://docs.python.org/3.4/glossary.html#term-path-entry-finder
sys.path_importer_cache
https://docs.python.org/3.4/library/sys.html#sys.path_importer_cache
[3]
https://docs.python.org/3.4/reference/import.html#fnpic
sys.path_hooks
https://docs.python.org/3.4/library/sys.html#sys.path_hooks
path entry hooks
https://docs.python.org/3.4/glossary.html#term-path-entry-hook
path entry finder
https://docs.python.org/3.4/glossary.html#term-path-entry-finder
ImportError
https://docs.python.org/3.4/library/exceptions.html#ImportError
ImportError
https://docs.python.org/3.4/library/exceptions.html#ImportError
path entry finder
https://docs.python.org/3.4/glossary.html#term-path-entry-finder
path entry
https://docs.python.org/3.4/glossary.html#term-path-entry
import path
https://docs.python.org/3.4/glossary.html#term-import-path
ImportError
https://docs.python.org/3.4/library/exceptions.html#ImportError
sys.path_hooks
https://docs.python.org/3.4/library/sys.html#sys.path_hooks
path entry finder
https://docs.python.org/3.4/glossary.html#term-path-entry-finder
find_spec()
https://docs.python.org/3.4/library/importlib.html#importlib.machinery.PathFinder.find_spec
sys.path_importer_cache
https://docs.python.org/3.4/library/sys.html#sys.path_importer_cache
meta path finder
https://docs.python.org/3.4/glossary.html#term-meta-path-finder
path entry finder
https://docs.python.org/3.4/glossary.html#term-path-entry-finder
path entry hook
https://docs.python.org/3.4/glossary.html#term-path-entry-hook
sys.path_hooks
https://docs.python.org/3.4/library/sys.html#sys.path_hooks
¶
https://docs.python.org/3.4/reference/import.html#path-entry-finder-protocol
find_spec()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.PathEntryFinder.find_spec
find_spec()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.PathEntryFinder.find_spec
portion
https://docs.python.org/3.4/glossary.html#term-portion
find_spec()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.PathEntryFinder.find_spec
find_loader()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.PathEntryFinder.find_loader
find_module()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.PathEntryFinder.find_module
find_loader()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.PathEntryFinder.find_loader
portion
https://docs.python.org/3.4/glossary.html#term-portion
¶
https://docs.python.org/3.4/reference/import.html#replacing-the-standard-import-system
sys.meta_path
https://docs.python.org/3.4/library/sys.html#sys.meta_path
__import__()
https://docs.python.org/3.4/library/functions.html#__import__
ImportError
https://docs.python.org/3.4/library/exceptions.html#ImportError
find_spec()
https://docs.python.org/3.4/library/importlib.html#importlib.abc.MetaPathFinder.find_spec
¶
https://docs.python.org/3.4/reference/import.html#special-considerations-for-main
__main__
https://docs.python.org/3.4/library/__main__.html#module-__main__
elsewhere
https://docs.python.org/3.4/reference/toplevel_components.html#programs
sys
https://docs.python.org/3.4/library/sys.html#module-sys
builtins
https://docs.python.org/3.4/library/builtins.html#module-builtins
¶
https://docs.python.org/3.4/reference/import.html#main-spec
__main__
https://docs.python.org/3.4/library/__main__.html#module-__main__
-m
https://docs.python.org/3.4/using/cmdline.html#cmdoption-m
sys.path
https://docs.python.org/3.4/library/sys.html#sys.path
the remaining cases
https://docs.python.org/3.4/using/cmdline.html#using-on-interface-options
__main__
https://docs.python.org/3.4/library/__main__.html#module-__main__
-m
https://docs.python.org/3.4/using/cmdline.html#cmdoption-m
__main__
https://docs.python.org/3.4/library/__main__.html#module-__main__
¶
https://docs.python.org/3.4/reference/import.html#open-issues
PEP 395
http://www.python.org/dev/peps/pep-0395
¶
https://docs.python.org/3.4/reference/import.html#references
specification for packages
http://legacy.python.org/doc/essays/packages.html
sys.meta_path
https://docs.python.org/3.4/library/sys.html#sys.meta_path
PEP 302
http://www.python.org/dev/peps/pep-0302
PEP 420
http://www.python.org/dev/peps/pep-0420
PEP 420
http://www.python.org/dev/peps/pep-0420
namespace packages
https://docs.python.org/3.4/glossary.html#term-namespace-package
PEP 420
http://www.python.org/dev/peps/pep-0420
PEP 366
http://www.python.org/dev/peps/pep-0366
PEP 328
http://www.python.org/dev/peps/pep-0328
PEP 366
http://www.python.org/dev/peps/pep-0366
PEP 338
http://www.python.org/dev/peps/pep-0338
PEP 451
http://www.python.org/dev/peps/pep-0451
[1]
https://docs.python.org/3.4/reference/import.html#id1
types.ModuleType
https://docs.python.org/3.4/library/types.html#types.ModuleType
[2]
https://docs.python.org/3.4/reference/import.html#id2
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
sys.modules
https://docs.python.org/3.4/library/sys.html#sys.modules
[3]
https://docs.python.org/3.4/reference/import.html#id3
imp.NullImporter
https://docs.python.org/3.4/library/imp.html#imp.NullImporter
sys.path_importer_cache
https://docs.python.org/3.4/library/sys.html#sys.path_importer_cache
Porting Python code
https://docs.python.org/3.4/whatsnew/3.3.html#portingpythoncode
Table Of Contents
https://docs.python.org/3.4/contents.html
5. The import system
https://docs.python.org/3.4/reference/import.html
5.1. importlib
https://docs.python.org/3.4/reference/import.html#importlib
5.2. Packages
https://docs.python.org/3.4/reference/import.html#packages
5.2.1. Regular packages
https://docs.python.org/3.4/reference/import.html#regular-packages
5.2.2. Namespace packages
https://docs.python.org/3.4/reference/import.html#namespace-packages
5.3. Searching
https://docs.python.org/3.4/reference/import.html#searching
5.3.1. The module cache
https://docs.python.org/3.4/reference/import.html#the-module-cache
5.3.2. Finders and loaders
https://docs.python.org/3.4/reference/import.html#finders-and-loaders
5.3.3. Import hooks
https://docs.python.org/3.4/reference/import.html#import-hooks
5.3.4. The meta path
https://docs.python.org/3.4/reference/import.html#the-meta-path
5.4. Loading
https://docs.python.org/3.4/reference/import.html#loading
5.4.1. Loaders
https://docs.python.org/3.4/reference/import.html#loaders
5.4.2. Submodules
https://docs.python.org/3.4/reference/import.html#submodules
5.4.3. Module spec
https://docs.python.org/3.4/reference/import.html#module-spec
5.4.4. Import-related module attributes
https://docs.python.org/3.4/reference/import.html#import-related-module-attributes
5.4.5. module.__path__
https://docs.python.org/3.4/reference/import.html#module-path
5.4.6. Module reprs
https://docs.python.org/3.4/reference/import.html#module-reprs
5.5. The Path Based Finder
https://docs.python.org/3.4/reference/import.html#the-path-based-finder
5.5.1. Path entry finders
https://docs.python.org/3.4/reference/import.html#path-entry-finders
5.5.2. Path entry finder protocol
https://docs.python.org/3.4/reference/import.html#path-entry-finder-protocol
5.6. Replacing the standard import system
https://docs.python.org/3.4/reference/import.html#replacing-the-standard-import-system
5.7. Special considerations for __main__
https://docs.python.org/3.4/reference/import.html#special-considerations-for-main
5.7.1. __main__.__spec__
https://docs.python.org/3.4/reference/import.html#main-spec
5.8. Open issues
https://docs.python.org/3.4/reference/import.html#open-issues
5.9. References
https://docs.python.org/3.4/reference/import.html#references
4. Execution model
https://docs.python.org/3.4/reference/executionmodel.html
6. Expressions
https://docs.python.org/3.4/reference/expressions.html
Report a Bug
https://docs.python.org/3.4/bugs.html
Show Source
https://docs.python.org/3.4/_sources/reference/import.txt
index
https://docs.python.org/3.4/genindex.html
modules
https://docs.python.org/3.4/py-modindex.html
next
https://docs.python.org/3.4/reference/expressions.html
previous
https://docs.python.org/3.4/reference/executionmodel.html
Python
https://www.python.org/
3.4.10 Documentation
https://docs.python.org/3.4/index.html
The Python Language Reference
https://docs.python.org/3.4/reference/index.html
Copyright
https://docs.python.org/3.4/copyright.html
Please donate.
https://www.python.org/psf/donations/
Found a bug
https://docs.python.org/3.4/bugs.html
Sphinx
http://sphinx.pocoo.org/
URLs of
crawlers that visited me
.