NNTP Objects

NNTP instances have the following methods. The response that is returned as the first item in the return tuple of almost all methods is the server's response: a string beginning with a three-digit code. If the server's response indicates an error, the method raises one of the above exceptions.
\begin{funcdesc}{getwelcome}{}
Return the welcome message sent by the server in ...
...isclaimers or help
information that may be relevant to the user.)
\end{funcdesc}

\begin{funcdesc}{set_debuglevel}{level}
Set the instance's debugging level. This...
...ine sent and received on the connection (including message text).
\end{funcdesc}

\begin{funcdesc}{newgroups}{date\, time}
Send a \samp{NEWGROUPS} command. The \v...
...a list of
group names that are new since the given date and time.
\end{funcdesc}

\begin{funcdesc}{newnews}{group\, date\, time}
Send a \samp{NEWNEWS} command. He...
...,
\var{articles})} where \var{articles} is a list of article ids.
\end{funcdesc}

\begin{funcdesc}{list}{}
Send a \samp{LIST} command. Return a pair \code{(\var{r...
...group is moderated. (Note the ordering: \var{last}, \var{first}.)
\end{funcdesc}

\begin{funcdesc}{group}{name}
Send a \samp{GROUP} command, where \var{name} is t...
...var{name} is the group name. The numbers are returned as strings.
\end{funcdesc}

\begin{funcdesc}{help}{}
Send a \samp{HELP} command. Return a pair \code{(\var{response},
\var{list})} where \var{list} is a list of help strings.
\end{funcdesc}

\begin{funcdesc}{stat}{id}
Send a \samp{STAT} command, where \var{id} is the mes...
...d \var{id} is the
article id (enclosed in \samp{<} and \samp{>}).
\end{funcdesc}

\begin{funcdesc}{next}{}
Send a \samp{NEXT} command. Return as for \code{stat()}.
\end{funcdesc}

\begin{funcdesc}{last}{}
Send a \samp{LAST} command. Return as for \code{stat()}.
\end{funcdesc}

\begin{funcdesc}{head}{id}
Send a \samp{HEAD} command, where \var{id} has the sa...
...ders (an uninterpreted
list of lines, without trailing newlines).
\end{funcdesc}

\begin{funcdesc}{body}{id}
Send a \samp{BODY} command, where \var{id} has the sa...
...text (an
uninterpreted list of lines, without trailing newlines).
\end{funcdesc}

\begin{funcdesc}{article}{id}
Send a \samp{ARTICLE} command, where \var{id} has ...
...text (an
uninterpreted list of lines, without trailing newlines).
\end{funcdesc}

\begin{funcdesc}{slave}{}
Send a \samp{SLAVE} command. Return the server's \var{response}.
\end{funcdesc}

\begin{funcdesc}{xhdr}{header\, string}
Send an \samp{XHDR} command. This comman...
... \var{text} is the text of the requested header for
that article.
\end{funcdesc}

\begin{funcdesc}{post}{file}
Post an article using the \samp{POST} command. The ...
...st()} method
automatically escapes lines beginning with \samp{.}.
\end{funcdesc}

\begin{funcdesc}{ihave}{id\, file}
Send an \samp{IHAVE} command. If the response...
... error, treat
\var{file} exactly as for the \code{post()} method.
\end{funcdesc}

\begin{funcdesc}{quit}{}
Send a \samp{QUIT} command and close the connection. On...
...een called, no other methods of the NNTP object should be called.
\end{funcdesc}