Re: List comprehension and FieldStorage

2005-04-28 Thread Peter Otten
Derek Basch wrote: > print [(key, value) for key, value in form.keys() and form[key].value] and > bump The tutorial is always willing to make time for you :-) >>> import cgi >>> fs = cgi.FieldStorage(environ=dict(QUERY_STRING="alpha=1&beta=2")) >>> [(key, fs[key].value) for key in fs.keys()] [

Re: List comprehension and FieldStorage

2005-04-27 Thread Derek Basch
Sorry Peter. I will refrain from nudging in the future. I did spend time at the interactive prompt and got nothing. Maybe I will have better luck next time. -- http://mail.python.org/mailman/listinfo/python-list

Re: List comprehension and FieldStorage

2005-04-27 Thread Peter Hansen
Derek Basch wrote: bump If "bump" is supposed to be some kind of nudge to get people to reply, please have more patience. You posted only sometime late yesterday, and many people take up to a few days to receive the posts from this newsgroup, and even those who don't shouldn't be expected to re

Re: List comprehension and FieldStorage

2005-04-27 Thread Derek Basch
bump -- http://mail.python.org/mailman/listinfo/python-list

List comprehension and FieldStorage

2005-04-26 Thread Derek Basch
Given this FieldStorage object: FieldStorage(None, None, [MiniFieldStorage('Checkbox1', 'on'), MiniFieldStorage('Checkbox2', 'on')]) I am trying to cgi.urlencode the FieldStorage object to POST to another cgi script. The documentation for urlencode, http://docs.python.org/lib/module-urllib.html ,