[Zope] Pythonscript question

Dieter Maurer dieter at handshake.de
Sat Mar 27 05:48:00 EST 2004


drew nichols wrote at 2004-3-25 20:25 +1000:
>Can i get methods dynamically from a pythonscript?
>getattr doesn't seem to work.
>
>I guess external methods would work, but can this be done?
>
>##parameters=method=None
>##
>def a():
>    return 'Hello'
>
>if method is not None:
>    return getattr ( script, method )()

I should work...

What happens?

Important note: whenever you report problems "doen't seem to work"
is not enough information. Most problems result in an exception.
In this case, we need "Error type", "Error value" and "traceback"
together with an informal description of the problem.

-- 
Dieter



More information about the Zope mailing list