Answers for "python call a function from a string"

1

python call function from string

result = getattr(model_or_object, 'function')('arguments')
Posted by: Guest on June-10-2021
-1

python call function by string

getattr(obj, 'func')('foo', 'bar', 'args')
Posted by: Guest on March-20-2021

Code answers related to "python call a function from a string"

Python Answers by Framework

Browse Popular Code Answers by Language