R
Randall Smith
How do I import a module when given the module name as input?
Between __import__, imp, and rexec, I'm very lost. What I want to do
seems so simple, but I don't know the best way to do it. How would I
import a module into the current namespace using the equivalent of these
2 methods:
import modname
and
from modname import *
where modname is validated input
Randall
Between __import__, imp, and rexec, I'm very lost. What I want to do
seems so simple, but I don't know the best way to do it. How would I
import a module into the current namespace using the equivalent of these
2 methods:
import modname
and
from modname import *
where modname is validated input
Randall