Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python execute function from string

import foo
method_to_call = getattr(foo, 'bar')
result = method_to_call()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #execute #function #string
ADD COMMENT
Topic
Name
4+4 =