D
denny
Hello, rookie here.
I'm trying to import a module at runtime using variables to specify
which module, and which functions to execute. for example:
mStr = "sys"
fStr = "exit"
# load mod
mod = __import__(mStr)
# call function
mod.fStr()
can i do this sort of thing? other suggestions?
I'm trying to import a module at runtime using variables to specify
which module, and which functions to execute. for example:
mStr = "sys"
fStr = "exit"
# load mod
mod = __import__(mStr)
# call function
mod.fStr()
can i do this sort of thing? other suggestions?