Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

calling function whose name is in a variable

module = __import__('foo')
func = getattr(module, 'bar')
func()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #calling #function #variable
ADD COMMENT
Topic
Name
6+6 =