[Zope] Python script calling environment
Dieter Maurer
dieter@handshake.de
Mon, 15 Jul 2002 18:34:22 +0200
p.t. writes:
> I have this situation:
>
> root
> |
> |- actions (Folder)
> | |- action_1 (Script)
> |
> |- activity (Folder)
> |- aScript (Script) => running this script
> |- actions (Folder)
> |- action_2 (Script)
>
> If in aScript I call container.actions.action_1(), testing the script I get:
>
> Error Type: AttributeError
> Error Value: action_1
>
> I expected that, if "actions.action_1" was not found in "activity", it was
> searched in the parent folder of "activity", and so on up to the top of the
> tree.
"actions.action_1" is not atomic but consists of two components
"actions" and "action_1". Both are looked up individually (with
acquisition). When "actions" is looked up in "aScript", it finds
"root.activity.actions". With this starting point "action_1" is
looked up, but there is no such "action_1" reachable by acquisition
from this place.
Dieter