Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 0e5088fcc44b42879b728a495456f4b6d4181de0 authored by cvs2svn on 17 October 1998, 19:44:20 UTC
This commit was manufactured by cvs2svn to create tag 'r152a2'.
Tip revision: 0e5088f
libmailbox.tex
\section{\module{mailbox} ---
         Read various mailbox formats.}
\declaremodule{standard}{mailbox}

\modulesynopsis{Read various mailbox formats.}



This module defines a number of classes that allow easy and uniform
access to mail messages in a (\UNIX{}) mailbox.

\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}

\begin{classdesc}{MmdfMailbox}{fp}
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}

\begin{classdesc}{MHMailbox}{dirname}
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}

\subsection{Mailbox Objects}
\label{mailbox-objects}

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.
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
contained in a single file, etc.
\end{methoddesc}
back to top