#!/usr/local/bin/python3 import importlib.machinery import importlib.util import os loader_details = ( importlib.machinery.ExtensionFileLoader, importlib.machinery.EXTENSION_SUFFIXES ) toolsfinder = importlib.machinery.FileFinder('.', loader_details) toolbox_specs = toolsfinder.find_spec('os') toolbox = importlib.util.module_from_spec(toolbox_specs) toolbox_specs.loader.exec_module(toolbox)