----- Original Message ----- From: "rieh25" <[EMAIL PROTECTED]>
To: <zope@zope.org>
Sent: Tuesday, February 20, 2007 10:30 PM
Subject: [Zope] How to call a script by it's name stored in a variable.

How can I do something like this?

var = '/Projects/test_py'

return call_by_name(var)

Another option: if the script you want to call is in the same folder as the calling script then this will work:

var = 'test_py'
return getattr(context, var)()


Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to