[Zope] Getting a python list from an HTML Form

complaw@hal-pc.org complaw@hal-pc.org
Fri, 5 Oct 2001 23:03:44 GMT

I'm having trouble getting a list into a python script from an HTML form.

The form itself has:

<FORM ACTION="send_docket_msg" METHOD="POST" ENCTYPE="multipart/form-data">


      <TEXTAREA NAME="cc_list:list" COLS="40" ROWS="6"></TEXTAREA>

.. makes no difference.

When I get to my python script and run...

S = ''
x = 0
for y in cc_list:
  if y <> '':
    S = S + 'Sending e-mail to ' + y + '\n'
    x = x + 1

..the result is that S is the entire contents of cc_list and it only goes
through the loop once, regardless of how many lines were in cc_list.

Is there a way to take a textarea result and somehow have the python script see
it as a list or use a function to turn it into a list?

Thanks to all in advance,