module-mhlib.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>12.15 mhlib -- Access to MH mailboxes</title>
<META NAME="description" CONTENT="12.15 mhlib -- Access to MH mailboxes">
<META NAME="keywords" CONTENT="lib">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="STYLESHEET" href="lib.css" tppabs="http://www.python.org/doc/current/lib/lib.css">
<LINK REL="next" href="module-mimify.html" tppabs="http://www.python.org/doc/current/lib/module-mimify.html">
<LINK REL="previous" href="module-mailbox.html" tppabs="http://www.python.org/doc/current/lib/module-mailbox.html">
<LINK REL="up" href="netdata.html" tppabs="http://www.python.org/doc/current/lib/netdata.html">
<LINK REL="next" href="mh-objects.html" tppabs="http://www.python.org/doc/current/lib/mh-objects.html">
</head>
<body>
<DIV CLASS="navigation"><table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td><A href="mailbox-objects.html" tppabs="http://www.python.org/doc/current/lib/mailbox-objects.html"><img src="previous.gif" tppabs="http://www.python.org/doc/current/icons/previous.gif" border="0" height="32"
alt="Previous Page" width="32"></A></td>
<td><A href="netdata.html" tppabs="http://www.python.org/doc/current/lib/netdata.html"><img src="up.gif" tppabs="http://www.python.org/doc/current/icons/up.gif" border="0" height="32"
alt="Up One Level" width="32"></A></td>
<td><A href="mh-objects.html" tppabs="http://www.python.org/doc/current/lib/mh-objects.html"><img src="next.gif" tppabs="http://www.python.org/doc/current/icons/next.gif" border="0" height="32"
alt="Next Page" width="32"></A></td>
<td align="center" width="100%">Python Library Reference</td>
<td><A href="contents.html" tppabs="http://www.python.org/doc/current/lib/contents.html"><img src="contents.gif" tppabs="http://www.python.org/doc/current/icons/contents.gif" border="0" height="32"
alt="Contents" width="32"></A></td>
<td><a href="modindex.html" tppabs="http://www.python.org/doc/current/lib/modindex.html" title="Module Index"><img src="modules.gif" tppabs="http://www.python.org/doc/current/icons/modules.gif" border="0" height="32"
alt="Module Index" width="32"></a></td>
<td><A href="genindex.html" tppabs="http://www.python.org/doc/current/lib/genindex.html"><img src="index.gif" tppabs="http://www.python.org/doc/current/icons/index.gif" border="0" height="32"
alt="Index" width="32"></A></td>
</tr></table>
<b class="navlabel">Previous:</b> <a class="sectref" href="mailbox-objects.html" tppabs="http://www.python.org/doc/current/lib/mailbox-objects.html">12.14.1 Mailbox Objects</A>
<b class="navlabel">Up:</b> <a class="sectref" href="netdata.html" tppabs="http://www.python.org/doc/current/lib/netdata.html">12. Internet Data Handling</A>
<b class="navlabel">Next:</b> <a class="sectref" href="mh-objects.html" tppabs="http://www.python.org/doc/current/lib/mh-objects.html">12.15.1 MH Objects</A>
<br><hr></DIV>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION00141500000000000000000">
12.15 <tt class="module">mhlib</tt> --
Access to MH mailboxes</A>
</H1>
<P>
<P>
The <tt class="module">mhlib</tt> module provides a Python interface to MH folders and
their contents.
<P>
The module contains three basic classes, <tt class="class">MH</tt>, which represents a
particular collection of folders, <tt class="class">Folder</tt>, which represents a single
folder, and <tt class="class">Message</tt>, which represents a single message.
<P>
<dl><dt><b><a name='l2h-2502'><tt class='class'>MH</tt></a></b> (<big>[</big><var>path</var><big>[</big><var>, profile</var><big>]</big><big>]</big>)
<dd>
<tt class="class">MH</tt> represents a collection of MH folders.
</dl>
<P>
<dl><dt><b><a name='l2h-2503'><tt class='class'>Folder</tt></a></b> (<var>mh, name</var>)
<dd>
The <tt class="class">Folder</tt> class represents a single folder and its messages.
</dl>
<P>
<dl><dt><b><a name='l2h-2504'><tt class='class'>Message</tt></a></b> (<var>folder, number</var><big>[</big><var>, name</var><big>]</big>)
<dd>
<tt class="class">Message</tt> objects represent individual messages in a folder. The
Message class is derived from <tt class="class">mimetools.Message</tt>.
</dl>
<P>
<p><hr>
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
<UL>
<LI><A NAME="tex2html4671"
href="mh-objects.html" tppabs="http://www.python.org/doc/current/lib/mh-objects.html">12.15.1 MH Objects </A>
<LI><A NAME="tex2html4672"
href="mh-folder-objects.html" tppabs="http://www.python.org/doc/current/lib/mh-folder-objects.html">12.15.2 Folder Objects </A>
<LI><A NAME="tex2html4673"
href="mh-message-objects.html" tppabs="http://www.python.org/doc/current/lib/mh-message-objects.html">12.15.3 Message Objects </A>
</UL>
<!--End of Table of Child-Links-->
<DIV CLASS="navigation"><p><hr><table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td><A href="mailbox-objects.html" tppabs="http://www.python.org/doc/current/lib/mailbox-objects.html"><img src="previous.gif" tppabs="http://www.python.org/doc/current/icons/previous.gif" border="0" height="32"
alt="Previous Page" width="32"></A></td>
<td><A href="netdata.html" tppabs="http://www.python.org/doc/current/lib/netdata.html"><img src="up.gif" tppabs="http://www.python.org/doc/current/icons/up.gif" border="0" height="32"
alt="Up One Level" width="32"></A></td>
<td><A href="mh-objects.html" tppabs="http://www.python.org/doc/current/lib/mh-objects.html"><img src="next.gif" tppabs="http://www.python.org/doc/current/icons/next.gif" border="0" height="32"
alt="Next Page" width="32"></A></td>
<td align="center" width="100%">Python Library Reference</td>
<td><A href="contents.html" tppabs="http://www.python.org/doc/current/lib/contents.html"><img src="contents.gif" tppabs="http://www.python.org/doc/current/icons/contents.gif" border="0" height="32"
alt="Contents" width="32"></A></td>
<td><a href="modindex.html" tppabs="http://www.python.org/doc/current/lib/modindex.html" title="Module Index"><img src="modules.gif" tppabs="http://www.python.org/doc/current/icons/modules.gif" border="0" height="32"
alt="Module Index" width="32"></a></td>
<td><A href="genindex.html" tppabs="http://www.python.org/doc/current/lib/genindex.html"><img src="index.gif" tppabs="http://www.python.org/doc/current/icons/index.gif" border="0" height="32"
alt="Index" width="32"></A></td>
</tr></table>
<b class="navlabel">Previous:</b> <a class="sectref" href="mailbox-objects.html" tppabs="http://www.python.org/doc/current/lib/mailbox-objects.html">12.14.1 Mailbox Objects</A>
<b class="navlabel">Up:</b> <a class="sectref" href="netdata.html" tppabs="http://www.python.org/doc/current/lib/netdata.html">12. Internet Data Handling</A>
<b class="navlabel">Next:</b> <a class="sectref" href="mh-objects.html" tppabs="http://www.python.org/doc/current/lib/mh-objects.html">12.15.1 MH Objects</A>
</DIV>
<!--End of Navigation Panel-->
<ADDRESS>
<hr>See <i><a href="about.html" tppabs="http://www.python.org/doc/current/lib/about.html">About this document...</a></i> for information on suggesting changes.
</ADDRESS>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -