Hello,
I have a class:
class foo:
def method1(self,args):
return 'one'
def method2(self):
return 'two'
and I have a series of strings li = ['foo.method1','foo.method2']
is there anyway I can do this?:
for l in li:
print l(args)
getattr('foo','method1') didn't work as 'foo' is invalid.
Any suggestions appreciated.
Guy