I have a script define many functions. Now I want to execute some of them in a batch.
eg:
def foo_fun1():
xxx
def foo_fun2():
xxx
...
def bar_funx():
yyy
I now want to loop all function and pickup some of them if the function name contains "foo", how to archive that ?
for fun in dir():
if 'foo' in fun:
#
# the fun is string
# how to call the string as function here??
Thanks!