Getting a function name from string

David Rasmussen david.rasmussen at gmx.net
Wed Nov 2 17:55:34 EST 2005


If I have a string that contains the name of a function, can I call it? 
As in:

def someFunction():
	print "Hello"

s = "someFunction"
s() # I know this is wrong, but you get the idea...

/David



More information about the Python-list mailing list