0
0
mirror of https://github.com/python/cpython.git synced 2024-12-01 03:01:36 +01:00
cpython/Doc/lib/libmailbox.tex

53 lines
1.8 KiB
TeX
Raw Normal View History

\section{\module{mailbox} ---
Read various mailbox formats}
\declaremodule{standard}{mailbox}
\modulesynopsis{Read various mailbox formats.}
1997-06-02 23:04:41 +02:00
This module defines a number of classes that allow easy and uniform
access to mail messages in a (\UNIX{}) mailbox.
1997-06-02 23:04:41 +02:00
\begin{classdesc}{UnixMailbox}{fp}
Access a classic \UNIX{}-style mailbox, where all messages are contained
in a single file and separated by ``From name time'' lines.
The file object \var{fp} points to the mailbox file.
\end{classdesc}
1997-06-02 23:04:41 +02:00
\begin{classdesc}{MmdfMailbox}{fp}
1997-06-02 23:04:41 +02:00
Access an MMDF-style mailbox, where all messages are contained
in a single file and separated by lines consisting of 4 control-A
characters. The file object \var{fp} points to the mailbox file.
\end{classdesc}
1997-06-02 23:04:41 +02:00
\begin{classdesc}{MHMailbox}{dirname}
1997-06-02 23:04:41 +02:00
Access an MH mailbox, a directory with each message in a separate
file with a numeric name.
The name of the mailbox directory is passed in \var{dirname}.
\end{classdesc}
1997-06-02 23:04:41 +02:00
\begin{classdesc}{Maildir}{dirname}
Access a Qmail mail directory. All new and current mail for the
mailbox specified by \var{dirname} is made available.
\end{classdesc}
\begin{classdesc}{BabylMailbox}{fp}
Access a Babyl mailbox, which is similar to an MMDF mailbox. Mail
messages start with \code{'*** EOOH ***\n'} and end with
\code{'\037\014\n'}.
\end{classdesc}
\subsection{Mailbox Objects \label{mailbox-objects}}
1997-06-02 23:04:41 +02:00
All implementations of Mailbox objects have one externally visible
method:
\begin{methoddesc}[mailbox]{next}{}
Return the next message in the mailbox, as a \class{rfc822.Message} object.
1997-06-02 23:04:41 +02:00
Depending on the mailbox implementation the \var{fp} attribute of this
object may be a true file object or a class instance simulating a file object,
taking care of things like message boundaries if multiple mail messages are
1997-06-02 23:04:41 +02:00
contained in a single file, etc.
\end{methoddesc}