Skip to content
UPEEC

importlib

The import system as a library: import by name, reload modules, read package resources and metadata.

Intermediate
Comments 0
import importlib
mod = importlib.import_module("plugins.led")
from importlib.metadata import version; version("numpy")

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.