Hi.
I am trying to "convert" a string into a function pointer.
Suppose I have the following:
from a import a
from b import b
from c import c
funcString = GetFunctionAsSt ring()
and funcString is a string that contains either "a", "b" or "c".
How can I simply call the correct function?
I have tried using getattr() but I don't know what the first (object)
argument should be in this case.
Thanks,
Håkan Persson
I am trying to "convert" a string into a function pointer.
Suppose I have the following:
from a import a
from b import b
from c import c
funcString = GetFunctionAsSt ring()
and funcString is a string that contains either "a", "b" or "c".
How can I simply call the correct function?
I have tried using getattr() but I don't know what the first (object)
argument should be in this case.
Thanks,
Håkan Persson
Comment