mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
Doc update from Piers Lauder see changes for imaplib.py version 2.16.
This commit is contained in:
parent
8c0622114b
commit
5f7a28cdf8
1 changed files with 32 additions and 0 deletions
|
|
@ -41,6 +41,12 @@ and instantiating a new one will usually allow recovery from this
|
||||||
exception.
|
exception.
|
||||||
\end{excdesc}
|
\end{excdesc}
|
||||||
|
|
||||||
|
\begin{excdesc}{IMAP4.readonly}
|
||||||
|
This exception is raised when a writeable mailbox has its status changed by the server. This is a
|
||||||
|
sub-class of \exception{IMAP4.error}. Some other client now has write permission,
|
||||||
|
and the mailbox will need to be re-opened to re-obtain write permission.
|
||||||
|
\end{excdesc}
|
||||||
|
|
||||||
The following utility functions are defined:
|
The following utility functions are defined:
|
||||||
|
|
||||||
\begin{funcdesc}{Internaldate2tuple}{datestr}
|
\begin{funcdesc}{Internaldate2tuple}{datestr}
|
||||||
|
|
@ -84,6 +90,13 @@ extensive example of usage.
|
||||||
All IMAP4rev1 commands are represented by methods of the same name,
|
All IMAP4rev1 commands are represented by methods of the same name,
|
||||||
either upper-case or lower-case.
|
either upper-case or lower-case.
|
||||||
|
|
||||||
|
All arguments to commands are converted to strings, except for
|
||||||
|
AUTHENTICATE, and the last argument to APPEND which is passed as
|
||||||
|
an IMAP4 literal. If necessary (the string contains
|
||||||
|
IMAP4 protocol-sensitive characters and isn't enclosed with either parentheses or
|
||||||
|
double quotes) each string is quoted. However, the \var{password}
|
||||||
|
argument to the LOGIN command is always quoted.
|
||||||
|
|
||||||
Each command returns a tuple: \code{(\var{type}, [\var{data},
|
Each command returns a tuple: \code{(\var{type}, [\var{data},
|
||||||
...])} where \var{type} is usually \code{'OK'} or \code{'NO'},
|
...])} where \var{type} is usually \code{'OK'} or \code{'NO'},
|
||||||
and \var{data} is either the text from the command response, or
|
and \var{data} is either the text from the command response, or
|
||||||
|
|
@ -144,6 +157,7 @@ An \class{IMAP4} instance has the following methods:
|
||||||
|
|
||||||
\begin{methoddesc}{login}{user, password}
|
\begin{methoddesc}{login}{user, password}
|
||||||
Identify the client using a plaintext password.
|
Identify the client using a plaintext password.
|
||||||
|
The \var{password} will be quoted.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{logout}{}
|
\begin{methoddesc}{logout}{}
|
||||||
|
|
@ -157,6 +171,20 @@ An \class{IMAP4} instance has the following methods:
|
||||||
Returned data are tuples of message part envelope and data.
|
Returned data are tuples of message part envelope and data.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
|
\begin{methoddesc}{noop}{}
|
||||||
|
Send NOOP to server.
|
||||||
|
\end{methoddesc}
|
||||||
|
|
||||||
|
\begin{methoddesc}{open}{host, port}
|
||||||
|
Opens socket to \var{port} at \var{host}.
|
||||||
|
You may override this method.
|
||||||
|
\end{methoddesc}
|
||||||
|
|
||||||
|
\begin{methoddesc}{partial}{message_num, message_part, start, length}
|
||||||
|
Fetch truncated part of a message.
|
||||||
|
Returned data is a tuple of message part envelope and data.
|
||||||
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{recent}{}
|
\begin{methoddesc}{recent}{}
|
||||||
Prompt server for an update. Returned data is \code{None} if no new
|
Prompt server for an update. Returned data is \code{None} if no new
|
||||||
messages, else value of \samp{RECENT} response.
|
messages, else value of \samp{RECENT} response.
|
||||||
|
|
@ -183,6 +211,10 @@ An \class{IMAP4} instance has the following methods:
|
||||||
to the mailbox are not allowed.
|
to the mailbox are not allowed.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
|
\begin{methoddesc}{socket}{}
|
||||||
|
Returns socket instance used to connect to server.
|
||||||
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{status}{mailbox, names}
|
\begin{methoddesc}{status}{mailbox, names}
|
||||||
Request named status conditions for \var{mailbox}.
|
Request named status conditions for \var{mailbox}.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue