On Tue, Aug 12, 2003 at 03:15:40PM +0200, Michael Bleijerveld wrote:
Hi all,
I am trying to get the fileValues in a LocalFS subfolder with the name admin but the following statements don't work.
from AccessControl import getSecurityManager user = getSecurityManager().getUser() username = user.getUserName()
return 'container.%s.fileValues()' % username
The result is container.admin.fileValues()
well, sure... you built a string and returned it; the string happens to resemble python code but that doesn't mean it magically gets interpreted ;-)
but is has to be [<LocalFile instance at 018A0210>, <LocalFile instance at 0189F720>].
Anyone suggestions ?
you might try: return container[username].fileValues() or maybe u = getattr(container, username) return u.fileValues() -- Paul Winkler http://www.slinkp.com