nntplib.NNTPError.response

response The response of the server if available, as a str object.

nntplib.NNTPError

exception nntplib.NNTPError Derived from the standard exception Exception, this is the base class for all exceptions raised by the nntplib module. Instances of this class have the following attribute: response The response of the server if available, as a str object.

nntplib.NNTPDataError

exception nntplib.NNTPDataError Exception raised when there is some error in the response data.

nntplib.NNTP.xpath()

NNTP.xpath(id) Return a pair (resp, path), where path is the directory path to the article with message ID id. Most of the time, this extension is not enabled by NNTP server administrators. Deprecated since version 3.3: The XPATH extension is not actively used.

nntplib.NNTP.xover()

NNTP.xover(start, end, *, file=None) Send an XOVER command. start and end are article numbers delimiting the range of articles to select. The return value is the same of for over(). It is recommended to use over() instead, since it will automatically use the newer OVER command if available.

nntplib.NNTP.xhdr()

NNTP.xhdr(hdr, str, *, file=None) Send an XHDR command. The hdr argument is a header keyword, e.g. 'subject'. The str argument should have the form 'first-last' where first and last are the first and last article numbers to search. Return a pair (response, list), where list is a list of pairs (id, text), where id is an article number (as a string) and text is the text of the requested header for that article. If the file parameter is supplied, then the output of the XHDR command is stored in

nntplib.NNTP.stat()

NNTP.stat(message_spec=None) Send a STAT command, where message_spec is either a message id (enclosed in '<' and '>') or an article number in the current group. If message_spec is omitted or None, the current article in the current group is considered. Return a triple (response, number, id) where number is the article number and id is the message id. >>> _, _, first, last, _ = s.group('gmane.comp.python.devel') >>> resp, number, message_id = s.stat(first) >>>

nntplib.NNTP.starttls()

NNTP.starttls(ssl_context=None) Send a STARTTLS command. This will enable encryption on the NNTP connection. The ssl_context argument is optional and should be a ssl.SSLContext object. Please read Security considerations for best practices. Note that this may not be done after authentication information has been transmitted, and authentication occurs by default if possible during a NNTP object initialization. See NNTP.login() for information on suppressing this behavior. New in version 3.2.

nntplib.NNTP.slave()

NNTP.slave() Send a SLAVE command. Return the server’s response.

nntplib.NNTP.set_debuglevel()

NNTP.set_debuglevel(level) Set the instance’s debugging level. This controls the amount of debugging output printed. The default, 0, produces no debugging output. A value of 1 produces a moderate amount of debugging output, generally a single line per request or response. A value of 2 or higher produces the maximum amount of debugging output, logging each line sent and received on the connection (including message text).