-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
import pkgutil
import importlib
all = [] # Define all here
def _import_modules():
prefixLen = len(name) + 1
for _, moduleName, _ in pkgutil.iter_modules(path, prefix=f'{name}.'):
moduleNameWithoutPrefix = moduleName[prefixLen:]
all.append(moduleNameWithoutPrefix)
module = importlib.import_module(moduleName)
globals()[moduleNameWithoutPrefix] = module
_import_modules()
Originally posted by @JeoCrypto in JustAnotherArchivist/snscrape#1036 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels