nntplib.NNTP.body()

NNTP.body(message_spec=None, *, file=None) Same as article(), but sends a BODY command. The lines returned (or written to file) will only contain the message body, not the headers.

nntplib.NNTP.article()

NNTP.article(message_spec=None, *, file=None) Send an ARTICLE command, where message_spec has the same meaning as for stat(). Return a tuple (response, info) where info is a namedtuple with three attributes number, message_id and lines (in that order). number is the article number in the group (or 0 if the information is not available), message_id the message id as a string, and lines a list of lines (without terminating newlines) comprising the raw message including headers and body. >&g

nntplib.NNTP

class nntplib.NNTP(host, port=119, user=None, password=None, readermode=None, usenetrc=False[, timeout]) Return a new NNTP object, representing a connection to the NNTP server running on host host, listening at port port. An optional timeout can be specified for the socket connection. If the optional user and password are provided, or if suitable credentials are present in /.netrc and the optional flag usenetrc is true, the AUTHINFO USER and AUTHINFO PASS commands are used to identify and au

nntplib.decode_header()

nntplib.decode_header(header_str) Decode a header value, un-escaping any escaped non-ASCII characters. header_str must be a str object. The unescaped value is returned. Using this function is recommended to display some headers in a human readable form: >>> decode_header("Some subject") 'Some subject' >>> decode_header("=?ISO-8859-15?Q?D=E9buter_en_Python?=") 'Débuter en Python' >>> decode_header("Re: =?UTF-8?B?cHJvYmzDqG1lIGRlIG1hdHJpY2U=?=") 'Re: problème de matr

nis.match()

nis.match(key, mapname, domain=default_domain) Return the match for key in map mapname, or raise an error (nis.error) if there is none. Both should be strings, key is 8-bit clean. Return value is an arbitrary array of bytes (may contain NULL and other joys). Note that mapname is first checked if it is an alias to another name. The domain argument allows overriding the NIS domain used for the lookup. If unspecified, lookup is in the default NIS domain.

nis.maps()

nis.maps(domain=default_domain) Return a list of all valid maps. The domain argument allows overriding the NIS domain used for the lookup. If unspecified, lookup is in the default NIS domain.

nis.get_default_domain()

nis.get_default_domain() Return the system default NIS domain.

nis.error

exception nis.error An error raised when a NIS function returns an error code.

nis.cat()

nis.cat(mapname, domain=default_domain) Return a dictionary mapping key to value such that match(key, mapname)==value. Note that both keys and values of the dictionary are arbitrary arrays of bytes. Note that mapname is first checked if it is an alias to another name. The domain argument allows overriding the NIS domain used for the lookup. If unspecified, lookup is in the default NIS domain.

next()

next(iterator[, default]) Retrieve the next item from the iterator by calling its __next__() method. If default is given, it is returned if the iterator is exhausted, otherwise StopIteration is raised.