nntplib, huge xover object

carroll at tjc.com carroll at tjc.com
Sat Apr 5 01:00:28 CEST 2003

On 3 Apr 2003 16:51:25 GMT, Ben Hutchings
<do-not-spam-ben.hutchings at businesswebsoftware.com> wrote:

>Or you can edit nntplib to add the option of storing XOVER output to a
>file.  It doesn't look like this would be too hard.  The 'file' could
>be an object that processes each line as it comes, rather than a real
>file.  Then send your change to nntplib back to the author and hope it's
>accepted into the official version.

That's not a bad idea.  David, you should consider taking this

Looking at nntplib.py, most of the logic to do this is already there:
xover calls longcmd to actually issue the command, and longcmd can
take an optional File parameter to which getlongresp (which actually
retrieves the response) will write its output, if present.

It wouldn't take much to add an optional file parameter to xover, and
modifying xover to pass it through to longcmd.  Right now, this is
only used in the body method, but I don't see why it wouldn't work for
xover or, for that matter, most of the other methods.

More information about the Python-list mailing list