These are useful if you want more control, or if you want to employ some of the algorithms implemented in this module in other circumstances.
sys.stdin).
application/x-www-form-urlencoded).
multipart/form-data (for
file uploads). Arguments are fp for the input file and
pdict for the dictionary containing other parameters of content-type header
Returns a dictionary just like parse_qs()
keys are the field names, each
value is a list of values for that field. This is easy to use but not
much good if you are expecting megabytes to be uploaded - in that case,
use the FieldStorage class instead which is much more flexible. Note
that content-type is the raw, unparsed contents of the content-type
header.
Note that this does not parse nested multipart parts - use FieldStorage for
that.
Content-type into a main
content-type and a dictionary of parameters.
&'', ``<'' and ``>'' in string s to HTML-safe
sequences. Use this if you need to display text that might contain
such characters in HTML. If the optional flag quote is true,
the double quote character (") is also translated; this helps
for inclusion in an HTML attribute value, e.g. in ``<A HREF="...">''.