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

Method over

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

Process an OVER command. If the command isn't supported, fall back to XOVER. Arguments: - message_spec: - either a message id, indicating the article to fetch information about - or a (start, end) tuple, indicating a range of article number

(self, message_spec, *, file=None)

Source from the content-addressed store, hash-verified

838 return resp, _parse_overview(lines, fmt)
839
840 def over(self, message_spec, *, file=None):
841 """Process an OVER command. If the command isn't supported, fall
842 back to XOVER. Arguments:
843 - message_spec:
844 - either a message id, indicating the article to fetch
845 information about
846 - or a (start, end) tuple, indicating a range of article numbers;
847 if end is None, information up to the newest message will be
848 retrieved
849 - or None, indicating the current article number must be used
850 - file: Filename string or file object to store the result in
851 Returns:
852 - resp: server response if successful
853 - list: list of dicts containing the response fields
854
855 NOTE: the "message id" form isn't supported by XOVER
856 """
857 cmd = 'OVER' if 'OVER' in self._caps else 'XOVER'
858 if isinstance(message_spec, (tuple, list)):
859 start, end = message_spec
860 cmd += ' {0}-{1}'.format(start, end or '')
861 elif message_spec is not None:
862 cmd = cmd + ' ' + message_spec
863 resp, lines = self._longcmdstring(cmd, file)
864 fmt = self._getoverviewfmt()
865 return resp, _parse_overview(lines, fmt)
866
867 def date(self):
868 """Process the DATE command.

Callers

nothing calls this directly

Calls 4

_longcmdstringMethod · 0.95
_getoverviewfmtMethod · 0.95
_parse_overviewFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected