methods and vars in zope objects

Dave Benjamin ramen at
Thu Apr 24 18:27:19 CEST 2003

In article <c42e062e.0304211805.4ced1175 at>,
Erik Lechak wrote:
> Is there a simple script, document, manual, or button that will list
> the methods and member vars available to a certain object?  Something
> like dir().

How about "dir()"? =)

Try this:
 1. Create a file in your Extensions directory called "".
 2. In this file, write the single line:
    dir_ = lambda x: dir(x)
 3. Create an External Method:
    id: dir
    module: dir
    function: dir_
 4. Use context.dir(obj) from your PythonScript.

In general, this technique works for exposing Python library functions to
the Zope environment. Mind the associated security risks, of course.


More information about the Python-list mailing list