I'm attempting to use the cgi module with code like this: import cgi fo = cgi.FieldStorage() # form field names are in the form if 'name:part' keys = fo.keys() for i in keys: try: item,value=i.split(':') except NameError, UnboundLocalError: print "exception..." item,value=(None,None) return(item,value)
However, the except block does not seem to catch the exception and an unboundlocalerror is thrown anyway. What am I missing? -- David Bear -- let me buy your intellectual property, I want to own your thoughts -- -- http://mail.python.org/mailman/listinfo/python-list