nntplib question

Alex Martelli aleax at aleax.it
Sun Feb 23 17:24:36 EST 2003


L. B. wrote:

> "Alex Martelli" <aleax at aleax.it> ha scritto nel messaggio
> news:rY96a.301016$AA2.11433845 at news2.tin.it...
>> msg_body = cnn.body(nart)
>>
>> should do it, assuming "nart" is the post id (including < and >
>> characters around it) or the post number within the group (a
>> number-within-the-group represented as a decimal string).
> 
> Think that the best way to get the body info is to save everything in
> a file and parse it using rfc822 module but i'm still confused about

It's one way (you get it with method .article), but what's wrong
with method .body?

> the way to do it... the only example i've found on Holden's book is
> about retrieving the subject of the post which is as easy as to
> retrieve the message-id since all these info's are stored in a tuple.

Only if your server has the XHDR extension to NNTP, which, while
popular, is, I believe, still not universal.


Alex





More information about the Python-list mailing list