Other CGI niceties
cgi.escape(s)
- translate "<", "&", ">" to "<", "&", ">"
cgi.parse_qs(string, keep_blank_values=0)
- parse query string to dictionary {"foo": ["bar"], ...}
cgi.parse([file], ...)
- ditto, takes query string from default locations
urllib.quote(s), urllib.unquote(s)
- convert between "~" and "%7e" (etc.)
urllib.urlencode(dict)
- convert dictionary {"foo": "bar", ...} to query string "foo=bar&..." # note asymmetry with parse_qs() above