Call variable as a function

Chmouel Boudjnah chmouel at chmouel.com
Thu Mar 3 01:09:25 EST 2005


Hey,

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"

and:

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