Also if i run it like this:
func_to_run = globals()[argumentsList[0],argumentsList[1]], i have no error but nothing happens so the methods are not called.
Does anyone have an idea about this? Or a solution I could try?
newStrList = [x.encode('UTF8') for x in argumentsList]
try:
#print(newStrList)
getattr(yourFile.yourClass,newStrList[0])()
getattr(yourFile.yourClass,newStrList[1])()
except KeyError:
pass
This is the solution that works for me. Of course you can iterate through the list but just to showcase the code.
func_to_run = globals()[argumentsList[0],argumentsList[1]], i have no error but nothing happens so the methods are not called.
Does anyone have an idea about this? Or a solution I could try?
newStrList = [x.encode('UTF8') for x in argumentsList]
try:
#print(newStrList)
getattr(yourFile.yourClass,newStrList[0])()
getattr(yourFile.yourClass,newStrList[1])()
except KeyError:
pass
This is the solution that works for me. Of course you can iterate through the list but just to showcase the code.