I'm trying to do the following:
import sys; sys.path.append('/var/www/python/includes')
import functionname
x = 'testarg'
fn = "functionname"
func = getattr(fn, fn)
func (x)
but am getting an error:
"TypeError: getattr(): attribute name must be string"
I have tried this before calling getattr but it still doesn't work:
str(fn)
I don't understand why this is happening, any advice is appreciated