Guido van Rossum | 39a23cc | 1997-06-02 21:04:41 +0000 | [diff] [blame] | 1 | \section{Standard Module \sectcode{mailbox}} |
| 2 | \stmodindex{mailbox} |
| 3 | |
| 4 | \renewcommand{\indexsubitem}{(in module mailbox)} |
| 5 | |
| 6 | This module defines a number of classes that allow easy and uniform |
| 7 | access to mail messages in a (unix) mailbox. |
| 8 | |
| 9 | \begin{funcdesc}{UnixMailbox}{fp} |
| 10 | Access a classic unix-style mailbox, where all messages are contained |
| 11 | in a single file and separated by ``From name time'' lines. \var{Fp} |
| 12 | is the file object pointing to the mailbox file. |
| 13 | \end{funcdesc} |
| 14 | |
| 15 | \begin{funcdesc}{MmdfMailbox}{fp} |
| 16 | Access an MMDF-style mailbox, where all messages are contained |
| 17 | in a single file and separated by lines consisting of 4 control-A |
| 18 | characters. \var{Fp} |
| 19 | is the file object pointing to the mailbox file. |
| 20 | \end{funcdesc} |
| 21 | |
| 22 | \begin{funcdesc}{MHMailbox}{dirname} |
| 23 | Access an MH mailbox, a directory with each message in a separate |
| 24 | file with a numeric name. \var{Dirname} |
| 25 | is the name of the mailbox directory. |
| 26 | \end{funcdesc} |
| 27 | |
| 28 | \subsection{Mailbox Objects} |
| 29 | |
| 30 | All implementations of Mailbox objects have one externally visible |
| 31 | method: |
| 32 | |
| 33 | \begin{funcdesc}{next}{} |
| 34 | Return the next message in the mailbox, as a \code{rfc822.Message} object= |
| 35 | =2E |
| 36 | Depending on the mailbox implementation the \var{fp} attribute of this |
| 37 | object may be a true file object or a class instance simulating a file ob= |
| 38 | ject, |
| 39 | taking care of things like message boundaries if multiple mail messages a= |
| 40 | re |
| 41 | contained in a single file, etc. |
| 42 | \end{funcdesc} |