I currently have an import called utilities
In this import there are two functions, utilities.func_1
and utilities.func_2
Now I know I can do print(dir(utilities))
to see the dictionary of functions this object has. In this case it outputs
['PIPE', 'Popen', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'func_1', 'func_2']
My question is assume I have the string x = 'func_1'
how would I go about being able to say, call the utilities function from this string.
So for example, how would I get the result of this
utilities.func_1(var1, var2)
by typing something like this
x = 'func_1'
utilities.x(var1, var2)