summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libmimetools.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/lib/libmimetools.tex')
-rw-r--r--Doc/lib/libmimetools.tex29
1 files changed, 13 insertions, 16 deletions
diff --git a/Doc/lib/libmimetools.tex b/Doc/lib/libmimetools.tex
index 0d4e40f..54d1fe0 100644
--- a/Doc/lib/libmimetools.tex
+++ b/Doc/lib/libmimetools.tex
@@ -1,8 +1,7 @@
-\section{Standard Module \sectcode{mimetools}}
+\section{Standard Module \module{mimetools}}
\label{module-mimetools}
\stmodindex{mimetools}
-\setindexsubitem{(in module mimetools)}
This module defines a subclass of the \class{rfc822.Message} class and
a number of utility functions that are useful for the manipulation for
@@ -53,9 +52,7 @@ open file \var{output}. The block size is currently fixed at 8192.
The \class{Message} class defines the following methods in
addition to the \class{rfc822.Message} methods:
-\setindexsubitem{(mimetool.Message method)}
-
-\begin{funcdesc}{getplist}{}
+\begin{methoddesc}{getplist}{}
Return the parameter list of the \code{content-type} header. This is
a list if strings. For parameters of the form
\samp{\var{key}=\var{value}}, \var{key} is converted to lower case but
@@ -63,36 +60,36 @@ a list if strings. For parameters of the form
\samp{Content-type: text/html; spam=1; Spam=2; Spam} then
\method{getplist()} will return the Python list \code{['spam=1',
'spam=2', 'Spam']}.
-\end{funcdesc}
+\end{methoddesc}
-\begin{funcdesc}{getparam}{name}
+\begin{methoddesc}{getparam}{name}
Return the \var{value} of the first parameter (as returned by
\method{getplist()} of the form \samp{\var{name}=\var{value}} for the
given \var{name}. If \var{value} is surrounded by quotes of the form
`\code{<}...\code{>}' or `\code{"}...\code{"}', these are removed.
-\end{funcdesc}
+\end{methoddesc}
-\begin{funcdesc}{getencoding}{}
+\begin{methoddesc}{getencoding}{}
Return the encoding specified in the \code{content-transfer-encoding}
message header. If no such header exists, return \code{'7bit'}. The
encoding is converted to lower case.
-\end{funcdesc}
+\end{methoddesc}
-\begin{funcdesc}{gettype}{}
+\begin{methoddesc}{gettype}{}
Return the message type (of the form \samp{\var{type}/\var{subtype}})
as specified in the \code{content-type} header. If no such header
exists, return \code{'text/plain'}. The type is converted to lower
case.
-\end{funcdesc}
+\end{methoddesc}
-\begin{funcdesc}{getmaintype}{}
+\begin{methoddesc}{getmaintype}{}
Return the main type as specified in the \code{content-type} header.
If no such header exists, return \code{'text'}. The main type is
converted to lower case.
-\end{funcdesc}
+\end{methoddesc}
-\begin{funcdesc}{getsubtype}{}
+\begin{methoddesc}{getsubtype}{}
Return the subtype as specified in the \code{content-type} header. If
no such header exists, return \code{'plain'}. The subtype is
converted to lower case.
-\end{funcdesc}
+\end{methoddesc}