[Zope] interating though REQUEST.form in python???

Kevin Howe support@performance-net.com
Tue, 8 Aug 2000 16:16:15 -0300


I'm trying to do a FOR statement to loop though items in a REQUEST, but keep
getting errors:

def myMethod(self,REQUEST):
  for name,value in REQUEST.form:
    # do this

I've tried variations:

for name,value in REQUEST.items:
for item in REQUEST.form.items:
for key in REQUEST.keys:

but none seem to work.

When I used "return REQUEST.form", a Dictionary was displayed like so:

  {'item': 'val1', 'item2':'val2', etc.}

so I tried fetching it as a plain dictionary:

  form = REQUEST.form
  return form.keys

but no luck.

Is it not possible to access the REQUEST methods via python?

Kevin