[Zope] accessing files using forms
Dieter Maurer
dieter at handshake.de
Sun Nov 23 14:25:49 EST 2003
alice wrote at 2003-11-23 17:25 +0700:
> ...
> if (monkey_name == existing_monkeys[i]):
> if (container.monkey_name == password):
> ...
> The problem is: 'container.monkey_name'
>
> If the script is run with monkey_name = Heidi.
> What we want is the file: container.Heidi
Use "getattr(container,monkey_name)", maybe with an optional (third)
default value.
--
Dieter
More information about the Zope
mailing list