[Zope] seeing every name in the current dtml namespace

Marcus Collins mcollins@sunesi.com
Fri, 7 Apr 2000 08:43:44 +0200


> -----Original Message-----
> From: Karl Anderson [mailto:kra@monkey.org]
> Sent: 06 April 2000 20:11
> To: zope@zope.org
> Subject: [Zope] seeing every name in the current dtml namespace
> 
> Is there any way to output, or iterate over, every name in the
> current dtml namespace?  I tried using _ as a dictionary, but 
> failed.

Hi, 

What about putting <dtml-var REQUEST> in your document? That will show you
the keys and values of all the form, cookie, and CGI environment objects, as
well as any that you've set(). Older versions of Zope (pre-2.1.2, IIRC)
allowed you to view the REQUEST object of a document/method by appending
REQUEST to its URL: http://path/to/some/object/REQUEST.

If you really want *everything* in the namespace (including built-in
modules, etc.), you could make an external method to loop over the objects
returned by the python globals() function.

hth,

-- Marcus