MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / newgroups

Method newgroups

tools/python-3.11.9-amd64/Lib/nntplib.py:596–610  ·  view source on GitHub ↗

Process a NEWGROUPS command. Arguments: - date: a date or datetime object Return: - resp: server response if successful - list: list of newsgroup names

(self, date, *, file=None)

Source from the content-addressed store, hash-verified

594 return resp, caps
595
596 def newgroups(self, date, *, file=None):
597 """Process a NEWGROUPS command. Arguments:
598 - date: a date or datetime object
599 Return:
600 - resp: server response if successful
601 - list: list of newsgroup names
602 """
603 if not isinstance(date, (datetime.date, datetime.date)):
604 raise TypeError(
605 "the date parameter must be a date or datetime object, "
606 "not '{:40}'".format(date.__class__.__name__))
607 date_str, time_str = _unparse_datetime(date, self.nntp_version < 2)
608 cmd = 'NEWGROUPS {0} {1}'.format(date_str, time_str)
609 resp, lines = self._longcmdstring(cmd, file)
610 return resp, self._grouplist(lines)
611
612 def newnews(self, group, date, *, file=None):
613 """Process a NEWNEWS command. Arguments:

Callers

nothing calls this directly

Calls 4

_longcmdstringMethod · 0.95
_grouplistMethod · 0.95
_unparse_datetimeFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected