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 module supplies a class
NNTP to connect to an NNTP server.
Returns an instance
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, ...