nntplib.NNTP.quit()

NNTP.quit() Send a QUIT command and close the connection. Once this method has been called, no other methods of the NNTP object should be called.

nntplib.NNTP.post()

NNTP.post(data) Post an article using the POST command. The data argument is either a file object opened for binary reading, or any iterable of bytes objects (representing raw lines of the article to be posted). It should represent a well-formed news article, including the required headers. The post() method automatically escapes lines beginning with . and appends the termination line. If the method succeeds, the server’s response is returned. If the server refuses posting, a NNTPReplyError

nntplib.NNTP.over()

NNTP.over(message_spec, *, file=None) Send an OVER command, or an XOVER command on legacy servers. message_spec can be either a string representing a message id, or a (first, last) tuple of numbers indicating a range of articles in the current group, or a (first, None) tuple indicating a range of articles starting from first to the last article in the current group, or None to select the current article in the current group. Return a pair (response, overviews). overviews is a list of (articl

nntplib.NNTP.nntp_version

NNTP.nntp_version An integer representing the version of the NNTP protocol supported by the server. In practice, this should be 2 for servers advertising RFC 3977 compliance and 1 for others. New in version 3.2.

nntplib.NNTP.nntp_implementation

NNTP.nntp_implementation A string describing the software name and version of the NNTP server, or None if not advertised by the server. New in version 3.2.

nntplib.NNTP.next()

NNTP.next() Send a NEXT command. Return as for stat().

nntplib.NNTP.newnews()

NNTP.newnews(group, date, *, file=None) Send a NEWNEWS command. Here, group is a group name or '*', and date has the same meaning as for newgroups(). Return a pair (response, articles) where articles is a list of message ids. This command is frequently disabled by NNTP server administrators.

nntplib.NNTP.newgroups()

NNTP.newgroups(date, *, file=None) Send a NEWGROUPS command. The date argument should be a datetime.date or datetime.datetime object. Return a pair (response, groups) where groups is a list representing the groups that are new since the given date. If file is supplied, though, then groups will be empty. >>> from datetime import date, timedelta >>> resp, groups = s.newgroups(date.today() - timedelta(days=3)) >>> len(groups) 85 >>> groups[0] GroupInfo(grou

nntplib.NNTP.login()

NNTP.login(user=None, password=None, usenetrc=True) Send AUTHINFO commands with the user name and password. If user and password are None and usenetrc is true, credentials from ~/.netrc will be used if possible. Unless intentionally delayed, login is normally performed during the NNTP object initialization and separately calling this function is unnecessary. To force authentication to be delayed, you must not set user or password when creating the object, and must set usenetrc to False. New

nntplib.NNTP.list()

NNTP.list(group_pattern=None, *, file=None) Send a LIST or LIST ACTIVE command. Return a pair (response, list) where list is a list of tuples representing all the groups available from this NNTP server, optionally matching the pattern string group_pattern. Each tuple has the form (group, last, first, flag), where group is a group name, last and first are the last and first article numbers, and flag usually takes one of these values: y: Local postings and articles from peers are allowed. m: