In the following code how to make the unicode data callable.The error that i get is //TypeError: 'unicode' object is not callable
def test(test_config):
for i in test_config:
print i.header //prints func1
print type(i.header) // prints unicode
try:
#i.header()//TypeError: 'unicode' object is not callable
func = globals()[i.header]
print func # found it
func()
except AttributeError:
logging.error("Method %s not implemented"%(i.header))
def func1():
print "In func1"
test(u'func1')