Network News
Network News, also known as Usenet, is mostly transmitted with the Network News Transport Protocol (NNTP). The specifications of the POP protocol are at http://www.ietf.org/rfc/rfc977.txt and http://www.ietf.org/rfc/rfc2980.txt. The Python standard library supports this protocol in module nntplib
. The nntplib
module supplies a class NNTP
to connect to an NNTP server.
NNTP |
Returns an instance |
Response Strings
An instance n
of NNTP
supplies many methods. Each of n
’s methods returns a tuple whose first item is a string (known as response
in the following), which is the response from the NNTP server to the NNTP command that corresponds to the method (method post
just returns the response
string, not a tuple). Each method returns the response
string just as the NNTP server supplies it. The string starts with an integer in decimal form (the integer is known as the return code), followed by a space, followed by explanatory text.
For some commands, ...
Get Python in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.