import sys
sys.path.append('/your/module/directory')
from autoimp import *
your_module.test()
Some keywords :
import imp
imp.load_module
module = __import__("module")
globals().update(vars(module))
Reference :
python - When automatically importing modules from a subfolder, their imports fail - Stack Overflow
Some Notes on Importing Modules by Name
python - Dynamic importing of modules followed by instantiation of objects with a certain baseclass from said modules - Stack Overflow
Some Notes on Importing Modules by Name
python - Dynamic importing of modules followed by instantiation of objects with a certain baseclass from said modules - Stack Overflow
Python autoimp module
沒有留言:
張貼留言