Accessing function in a module by name

Tobiah toby at tobiah.org
Wed Jun 6 18:13:57 EDT 2007


Is there a way to call function in an imported
module having only the name?


func_name = 'doit'

real_func = foo.some_magic(func_name)

#Now call it
real_func(args)


I'm trying to set up a function dispatcher for a
SOAP server.

Thanks,

Tobiah

-- 
Posted via a free Usenet account from http://www.teranews.com




More information about the Python-list mailing list