python : call an unknow method with named params
myMethod is the name of the method (string)
myArgs is a dict for named arguments
1 2 if hasattr(myObject,myMethod): 3 try: 4 retValue = getattr(myObject,myMethod)(*(),**(myArgs)) 5 except TypeError: 6 # arguments mismatch 7 else: 8 # there is no "myMethod" method in myObject