importlib — Python’s Import Mechanism — PyMOTW 3

The importlib module includes functions that the underlying implementation of Python’s import mechanism for loading code in packages and modules, all implemented in Python. It is one access point to importing modules dynamically, and useful in some cases where the name of the module that needs to be imported is unknown when the code is written (for example, for plugins or extensions to an application).

Read more…

This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.