I have the following simple structure:
Is there any way that, from the class main_class in function loadTests , I can call the function in name_of_class
ie. something like string1.string2 (p1, p2, ....) ? I've seen something similar done before, but can't quite
figure it out. Thanks for your help!
Code:
class main_class(...):
...
def loadTests(...):
string1 = "name_of_class"
string2 = "function_in_class"
string1.string2(p1,p2,...) #wish to do this but doesn't work..
...
class name_of_class
def function_in_class(self, p1, p2 ,...)
....
...
ie. something like string1.string2 (p1, p2, ....) ? I've seen something similar done before, but can't quite
figure it out. Thanks for your help!
Comment