Did you try template = 'template_1' obj = container.template_folders[template] or template = 'template_1' obj = getattr(container.template_folders,template) Troy Henny van der Linde wrote:
Hi,
I have this in a python script to copy/clone a folder.
obj=container.template_folders.template_1 pag=context.manage_clone(obj,id) pag.manage_changeProperties(title=title)
This works fine but here template_1 is hardcoded. How do I turn the last segment into a variable so I can call this script with a specific folder to clone?
thanks,
Henny van der Linde
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )