i'm trying to make something in Python. I'm trying to import a variable from another file but it doesn't appear to work... as it gives this
AttributeError: 'function' object has no attribute 'langName'
Here's the snippet which contains the variable (class is L10N - PS: not in the same code)
def buildName(self):
langName = 'names_'+self.language.upper()+'.txt'
print 'Current Loaded Names:'+langName()+'.'
return langName
and the part where i try to import (this is where the error is):
names = [l.strip('\n\r').split('*')[1:] for l in open(pp+'data/etc/'+l10n.buildName.langName+'',"r").readlines() if not l.startswith('#')]
Anyways to fix it? I imported it and i'm not sure it would work.
EDIT: TypeError: unbound method buildName() must be called with l10n instance as first argument (got nothing instead)
Now gives this. I don't know why.