Usually, when I need to dispatch a function call to one of several functions based on a string, I will make the functions elements of a dict. I've done this, for example, in writing a simple interpreter, where each keyword is implemented by a different function. You can even use decorators to elegantly take care of the assignments:
KEYWORD_FUNCTIONS = {}
def MAKE_KEYWORD( f ):
KEYWORD_FUNCTIONS[ f.func_name ] = f
return f
@MAKE_KEYWORD
def KEYWORD_A( arg ):
print "Keyword A with arg %s" % arg
@MAKE_KEYWORD
def KEYWORD_B( arg ):
print "Keyword B with arg %s" % arg
if __name__ == "__main__":
KEYWORD_FUNCTIONS[ "KEYWORD_A" ]( "first_argument" )
KEYWORD_FUNCTIONS[ "KEYWORD_B" ]( "second_argument" )