: You could also do this to import the modules normally (along with their own dependencies):
sys.path.append('/tmp')
import module_name
But if your module names are dynamic, that wouldn’t work.
The way you did it is fine.
: You could also do this to import the modules normally (along with their own dependencies):
sys.path.append('/tmp')
import module_name
But if your module names are dynamic, that wouldn’t work.
The way you did it is fine.