Functions

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.


\begin{funcdesc}{parse}{fp}: Parse a query in the environment or from a file (default \code{sys.stdin}).
\end{funcdesc}


\begin{funcdesc}{parse_qs}{qs}: parse a query string given as a string argument (data of type
\code{application/x-www-form-urlencoded}).
\end{funcdesc}


\begin{funcdesc}{parse_multipart}{fp\, pdict}: parse input of type \code{multipa...
...rse nested multipart parts -- use \code{FieldStorage} for
that.
\end{funcdesc}


\begin{funcdesc}{parse_header}{string}: parse a header like \code{Content-type} into a main
content-type and a dictionary of parameters.
\end{funcdesc}


\begin{funcdesc}{test}{}: robust test CGI script, usable as main program.
Write...
...and formats all information provided to
the script in HTML form.
\end{funcdesc}


\begin{funcdesc}{print_environ}{}: format the shell environment in HTML.
\end{funcdesc}


\begin{funcdesc}{print_form}{form}: format a form in HTML.
\end{funcdesc}


\begin{funcdesc}{print_directory}{}: format the current directory in HTML.
\end{funcdesc}


\begin{funcdesc}{print_environ_usage}{}: print a list of useful (used by CGI) environment variables in
HTML.
\end{funcdesc}


\begin{funcdesc}{escape}{}: convert the characters \lq\lq \code{\&}'', \lq\lq \code{<}'' a...
...e HREF
attribute of an \code{<A>} tag, use \code{urllib.quote()}.
\end{funcdesc}