Variable interpolation / string embedding in Python script?
In Zope Page Templates, you can insert a variable into a path expression like: here/folder/?id Where 'id' is evaluated before the path expression is. It's great for repeat structures. Is there a similar mechanism for use in a Python Script? Something like context.?id.method() I haven't had any luck finding it, if it exists. Thanks in advance, Jon Whitener Detroit Michigan USA
Jon Whitener wrote:
In Zope Page Templates, you can insert a variable into a path expression like:
here/folder/?id
Where 'id' is evaluated before the path expression is. It's great for repeat structures. Is there a similar mechanism for use in a Python Script? Something like
context.?id.method()
Hehe, you want: getattr(context,id).method() cheers, Chris
participants (2)
-
Chris Withers -
Jon Whitener