| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <link rel="STYLESHEET" href="lib.css" type='text/css' /> |
| 5 | <link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" /> |
| 6 | <link rel='start' href='../index.html' title='Python Documentation Index' /> |
| 7 | <link rel="first" href="lib.html" title='Python Library Reference' /> |
| 8 | <link rel='contents' href='contents.html' title="Contents" /> |
| 9 | <link rel='index' href='genindex.html' title='Index' /> |
| 10 | <link rel='last' href='about.html' title='About this document...' /> |
| 11 | <link rel='help' href='about.html' title='About this document...' /> |
| 12 | <link rel="next" href="mh-folder-objects.html" /> |
| 13 | <link rel="prev" href="module-mhlib.html" /> |
| 14 | <link rel="parent" href="module-mhlib.html" /> |
| 15 | <link rel="next" href="mh-folder-objects.html" /> |
| 16 | <meta name='aesop' content='information' /> |
| 17 | <title>12.5.1 MH Objects </title> |
| 18 | </head> |
| 19 | <body> |
| 20 | <DIV CLASS="navigation"> |
| 21 | <div id='top-navigation-panel' xml:id='top-navigation-panel'> |
| 22 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 23 | <tr> |
| 24 | <td class='online-navigation'><a rel="prev" title="12.5 mhlib " |
| 25 | href="module-mhlib.html"><img src='../icons/previous.png' |
| 26 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 27 | <td class='online-navigation'><a rel="parent" title="12.5 mhlib " |
| 28 | href="module-mhlib.html"><img src='../icons/up.png' |
| 29 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 30 | <td class='online-navigation'><a rel="next" title="12.5.2 Folder Objects" |
| 31 | href="mh-folder-objects.html"><img src='../icons/next.png' |
| 32 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 33 | <td align="center" width="100%">Python Library Reference</td> |
| 34 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 35 | href="contents.html"><img src='../icons/contents.png' |
| 36 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 37 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 38 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 39 | <td class='online-navigation'><a rel="index" title="Index" |
| 40 | href="genindex.html"><img src='../icons/index.png' |
| 41 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 42 | </tr></table> |
| 43 | <div class='online-navigation'> |
| 44 | <b class="navlabel">Previous:</b> |
| 45 | <a class="sectref" rel="prev" href="module-mhlib.html">12.5 mhlib </A> |
| 46 | <b class="navlabel">Up:</b> |
| 47 | <a class="sectref" rel="parent" href="module-mhlib.html">12.5 mhlib </A> |
| 48 | <b class="navlabel">Next:</b> |
| 49 | <a class="sectref" rel="next" href="mh-folder-objects.html">12.5.2 Folder Objects</A> |
| 50 | </div> |
| 51 | <hr /></div> |
| 52 | </DIV> |
| 53 | <!--End of Navigation Panel--> |
| 54 | |
| 55 | <H2><A NAME="SECTION0014510000000000000000"></A><A NAME="mh-objects"></A> |
| 56 | <BR> |
| 57 | 12.5.1 MH Objects |
| 58 | </H2> |
| 59 | |
| 60 | <P> |
| 61 | <tt class="class">MH</tt> instances have the following methods: |
| 62 | |
| 63 | <P> |
| 64 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 65 | <td><nobr><b><tt id='l2h-3975' xml:id='l2h-3975' class="method">error</tt></b>(</nobr></td> |
| 66 | <td><var>format</var><big>[</big><var>, ...</var><big>]</big><var></var>)</td></tr></table></dt> |
| 67 | <dd> |
| 68 | Print an error message - can be overridden. |
| 69 | </dl> |
| 70 | |
| 71 | <P> |
| 72 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 73 | <td><nobr><b><tt id='l2h-3976' xml:id='l2h-3976' class="method">getprofile</tt></b>(</nobr></td> |
| 74 | <td><var>key</var>)</td></tr></table></dt> |
| 75 | <dd> |
| 76 | Return a profile entry (<code>None</code> if not set). |
| 77 | </dl> |
| 78 | |
| 79 | <P> |
| 80 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 81 | <td><nobr><b><tt id='l2h-3977' xml:id='l2h-3977' class="method">getpath</tt></b>(</nobr></td> |
| 82 | <td><var></var>)</td></tr></table></dt> |
| 83 | <dd> |
| 84 | Return the mailbox pathname. |
| 85 | </dl> |
| 86 | |
| 87 | <P> |
| 88 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 89 | <td><nobr><b><tt id='l2h-3978' xml:id='l2h-3978' class="method">getcontext</tt></b>(</nobr></td> |
| 90 | <td><var></var>)</td></tr></table></dt> |
| 91 | <dd> |
| 92 | Return the current folder name. |
| 93 | </dl> |
| 94 | |
| 95 | <P> |
| 96 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 97 | <td><nobr><b><tt id='l2h-3979' xml:id='l2h-3979' class="method">setcontext</tt></b>(</nobr></td> |
| 98 | <td><var>name</var>)</td></tr></table></dt> |
| 99 | <dd> |
| 100 | Set the current folder name. |
| 101 | </dl> |
| 102 | |
| 103 | <P> |
| 104 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 105 | <td><nobr><b><tt id='l2h-3980' xml:id='l2h-3980' class="method">listfolders</tt></b>(</nobr></td> |
| 106 | <td><var></var>)</td></tr></table></dt> |
| 107 | <dd> |
| 108 | Return a list of top-level folders. |
| 109 | </dl> |
| 110 | |
| 111 | <P> |
| 112 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 113 | <td><nobr><b><tt id='l2h-3981' xml:id='l2h-3981' class="method">listallfolders</tt></b>(</nobr></td> |
| 114 | <td><var></var>)</td></tr></table></dt> |
| 115 | <dd> |
| 116 | Return a list of all folders. |
| 117 | </dl> |
| 118 | |
| 119 | <P> |
| 120 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 121 | <td><nobr><b><tt id='l2h-3982' xml:id='l2h-3982' class="method">listsubfolders</tt></b>(</nobr></td> |
| 122 | <td><var>name</var>)</td></tr></table></dt> |
| 123 | <dd> |
| 124 | Return a list of direct subfolders of the given folder. |
| 125 | </dl> |
| 126 | |
| 127 | <P> |
| 128 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 129 | <td><nobr><b><tt id='l2h-3983' xml:id='l2h-3983' class="method">listallsubfolders</tt></b>(</nobr></td> |
| 130 | <td><var>name</var>)</td></tr></table></dt> |
| 131 | <dd> |
| 132 | Return a list of all subfolders of the given folder. |
| 133 | </dl> |
| 134 | |
| 135 | <P> |
| 136 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 137 | <td><nobr><b><tt id='l2h-3984' xml:id='l2h-3984' class="method">makefolder</tt></b>(</nobr></td> |
| 138 | <td><var>name</var>)</td></tr></table></dt> |
| 139 | <dd> |
| 140 | Create a new folder. |
| 141 | </dl> |
| 142 | |
| 143 | <P> |
| 144 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 145 | <td><nobr><b><tt id='l2h-3985' xml:id='l2h-3985' class="method">deletefolder</tt></b>(</nobr></td> |
| 146 | <td><var>name</var>)</td></tr></table></dt> |
| 147 | <dd> |
| 148 | Delete a folder - must have no subfolders. |
| 149 | </dl> |
| 150 | |
| 151 | <P> |
| 152 | <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> |
| 153 | <td><nobr><b><tt id='l2h-3986' xml:id='l2h-3986' class="method">openfolder</tt></b>(</nobr></td> |
| 154 | <td><var>name</var>)</td></tr></table></dt> |
| 155 | <dd> |
| 156 | Return a new open folder object. |
| 157 | </dl> |
| 158 | |
| 159 | <P> |
| 160 | |
| 161 | <DIV CLASS="navigation"> |
| 162 | <div class='online-navigation'> |
| 163 | <p></p><hr /> |
| 164 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 165 | <tr> |
| 166 | <td class='online-navigation'><a rel="prev" title="12.5 mhlib " |
| 167 | href="module-mhlib.html"><img src='../icons/previous.png' |
| 168 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 169 | <td class='online-navigation'><a rel="parent" title="12.5 mhlib " |
| 170 | href="module-mhlib.html"><img src='../icons/up.png' |
| 171 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 172 | <td class='online-navigation'><a rel="next" title="12.5.2 Folder Objects" |
| 173 | href="mh-folder-objects.html"><img src='../icons/next.png' |
| 174 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 175 | <td align="center" width="100%">Python Library Reference</td> |
| 176 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 177 | href="contents.html"><img src='../icons/contents.png' |
| 178 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 179 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 180 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 181 | <td class='online-navigation'><a rel="index" title="Index" |
| 182 | href="genindex.html"><img src='../icons/index.png' |
| 183 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 184 | </tr></table> |
| 185 | <div class='online-navigation'> |
| 186 | <b class="navlabel">Previous:</b> |
| 187 | <a class="sectref" rel="prev" href="module-mhlib.html">12.5 mhlib </A> |
| 188 | <b class="navlabel">Up:</b> |
| 189 | <a class="sectref" rel="parent" href="module-mhlib.html">12.5 mhlib </A> |
| 190 | <b class="navlabel">Next:</b> |
| 191 | <a class="sectref" rel="next" href="mh-folder-objects.html">12.5.2 Folder Objects</A> |
| 192 | </div> |
| 193 | </div> |
| 194 | <hr /> |
| 195 | <span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span> |
| 196 | </DIV> |
| 197 | <!--End of Navigation Panel--> |
| 198 | <ADDRESS> |
| 199 | See <i><a href="about.html">About this document...</a></i> for information on suggesting changes. |
| 200 | </ADDRESS> |
| 201 | </BODY> |
| 202 | </HTML> |