Call variable as a function

Chmouel Boudjnah chmouel at
Thu Mar 3 07:09:25 CET 2005


It's look simple for most of the people here but i can't figure out to that.

If i have :

def test():
	print "foo"


var = "test"

how do i call function test from var, kind of ${$var} in some others 
languages (or eval())

Cheers, Chmouel.

More information about the Python-list mailing list