nntplib body question
Chuck Swiger
cswiger at mac.com
Wed Jun 4 09:25:19 EDT 2003
Peter Melchart wrote:
[ ... ]
> that's exactly what i want to do. but when i call nntpconn.body(id) it
> retrieves the whole body. how can i cut the connection after a certain
> amount of bytes. a kind of network-callback would be nice that is called
> after reading 1K or so, so i can skip the rest after 1 read 100 lines or
> so...
> is there anything like that ?
> the thing is, that i dont want to retrieve the whole article.
Can you provide a context for what you're trying to accomplish?
The overview database (xover command) might be able to provide a solution
without pounding on the news server too badly. Simply breaking the connection
in the middle is going to leave a nnrpd lingering around. Are you intending to
only do this once in a while, or are were you planning to do this for lots of
articles in some sort of scan?
--
-Chuck
More information about the Python-list
mailing list