nntplib.NNTP.__init__¶
-
NNTP.__init__(host, port=119, user=None, password=None, readermode=None, usenetrc=True)[source]¶ Initialize an instance. Arguments: - host: hostname to connect to - port: port to connect to (default the standard NNTP port) - user: username to authenticate with - password: password to use with username - readermode: if true, send ‘mode reader’ command after
connecting.readermode is sometimes necessary if you are connecting to an NNTP server on the local machine and intend to call reader-specific commands, such as `group’. If you get unexpected NNTPPermanentErrors, you might need to set readermode.