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: The group is moderated and all postings must be approved.
  • n: No local postings are allowed, only articles from peers.
  • j: Articles from peers are filed in the junk group instead.
  • x: No local postings, and articles from peers are ignored.
  • =foo.bar: Articles are filed in the foo.bar group instead.

If flag has another value, then the status of the newsgroup should be considered unknown.

This command can return very large results, especially if group_pattern is not specified. It is best to cache the results offline unless you really need to refresh them.

Changed in version 3.2: group_pattern was added.

doc_python
2016-10-07 17:38:12
Comments
Leave a Comment

Please login to continue.