Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python calling dynamic function on object

obj = MyClass()
try:
    func = getattr(obj, "dostuff")
    func()
except AttributeError:
    print "dostuff not found"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #calling #dynamic #function #object
ADD COMMENT
Topic
Name
2+9 =