ronrsr wrote: > Thank you, all. that was very helpful, and did solve many of my > problems. I was addressing the dict with () rather than []. > > I'm still having one problem, though -- extracting the keywords. NOw, > if you check the value for Form below, you'll see there is more than > one keyword entry. When I do: keywords = form["keywords"] - what sort > of data structure do I get back?
there is another func to get multiple values - see the docs. Basically, one can iterate all over form.list (which is not documented) to get the original order of all the fields. Robert > th anks so much again. > > -rsr- > > > if form.has_key("keywords"): > keywords = str(form["keywords"].value) > else: > keywords = "k" > fileHandle.write("here comes keywords:") > fileHandle.write(str(keywords)) > > fileHandle.write("keyword info"); > fileHandle.write(str(form.has_key("keywords"))) > fileHandle.flush() > >> here's the info I know: >> >> form = FieldStorage(None, None, [MiniFieldStorage('zid', '17'), >> MiniFieldStorage('keywords', 'aAUA'), MiniFieldStorage('keywords', >> 'aBOS'), MiniFieldStorage('citation', '<i>The Earth Times Monthly</i>, >> April 2002\\r\\n \\r\\n \r\n '), >> MiniFieldStorage('quotation', 'Farm support goes mainly to a relatively >> small number of agri-businesses, many of them large corps. Yet these >> subsidies are 6 times what rich countries provide in foreign aid to a >> developing world that includes 5 billion people.\\r\\n \r\n >> '), MiniFieldStorage('updatebutton', 'Update')]) >> form.has_key("citation") = True >> >> > -- http://mail.python.org/mailman/listinfo/python-list