[Tutor] Can't use NNTP?
Remco Gerlich
scarblac@pino.selwerd.nl
Fri, 15 Dec 2000 17:31:10 +0100
On Fri, Dec 15, 2000 at 11:14:23AM -0500, Voitenko, Denis wrote:
> I am trying to connect to an NNTP server as follows:
>
> import nntplib
> news = NNTP('news.man.torun.pl') # news.man.torun.pl is a public server
>
> and at this point I get an error:
>
> Traceback (innermost last):
> File "<interactive input>", line 1, in ?
> NameError: NNTP
> >>>
>
> what is wrong?
Something really simple: it should read
news = nntplib.NNTP('news.man.torun.pl')
You import a module, then you can call things inside it with
'modulename.element'.
--
Remco Gerlich