NNTP instances have the following methods. Theresponse that isreturned as the first item in the return tuple of almost all methodsis the server's response: a string beginning with a three-digit code.If the server's response indicates an error, the method raises one ofthe above exceptions.
0, produces no debuggingoutput. A value of1 produces a moderate amount of debuggingoutput, generally a single line per request or response. A value of2 or higher produces the maximum amount of debugging output,logging each line sent and received on the connection (includingmessage text).'yymmdd' indicating thedate, andtime should be a string of the form'hhmmss' indicating the time. Return a pair(response,groups) wheregroups is a list ofgroup names that are new since the given date and time.'*', anddate andtime have the same meaning as fornewgroups(). Return a pair(response,articles) wherearticles is a list of article ids.(response,list) wherelist is a list of tuples. Each tuple has theform(group,last,first,flag), wheregroup is a group name,last andfirst are the lastand first article numbers (as strings), andflag is'y' if posting is allowed,'n' if not, and'm' ifthe newsgroup is moderated. (Note the ordering:last,first.)(response,count,first,last,name) wherecount is the (estimated) numberof articles in the group,first is the first article number inthe group,last is the last article number in the group, andname is the group name. The numbers are returned as strings.(response,list) wherelist is a list of help strings.(response,number,id) wherenumber is the article number (as a string) andid is thearticle id (enclosed in "<" and ">").(response,number,id,list)where the first three are the same as forstat(),andlist is a list of the article's headers (an uninterpretedlist of lines, without trailing newlines).'subject'. Thestring argument should havethe form'first-last' wherefirst andlast are the first and last article numbers to search. Return apair(response,list), wherelist is a list ofpairs(id,text), whereid is an article id(as a string) andtext is the text of the requested header forthat article.(response,date,time),containing the current date and time in a form suitable for thenewnews() andnewgroups() methods.This is an optional NNTP extension, and may not be supported by allservers.(response,list), wherelist is a list of tuples containing(name,title).This is an optional NNTP extension, and may not be supported by allservers.(resp,list).list is a listof tuples, one for each article in the range delimited by thestartandend article numbers. Each tuple is of the form(article number,subject,poster,date,id,references,size,lines).This is an optional NNTP extension, and may not be supported by allservers.(resp,path), wherepath is thedirectory path to the article with message IDid. This is anoptional NNTP extension, and may not be supported by all servers.| Python Library Reference |