[EMAIL PROTECTED] wrote:

> 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()


getattr(mod, fStr)()
-- 
Giovanni Bajo


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to