Using nntplib
Gerhard Häring
gerhard at bigfoot.de
Thu May 30 16:30:00 EDT 2002
* jb <jblazi at hotmail.com> [2002-05-30 18:44 +0200]:
> Steve Holden wrote:
> > http://pydish.holdenweb.com/pwp/chp5notes.htm
> >
> > As far as informing the GUI thread about what's been received so far,
> > whether you use LIST or XOVER perhaps you could just put the headers onto
> > a Queue (see that Queue module) and letting the GUI thread take them off.
> > That should ease up any critical-section issues.
>
> Thx, this sounds intresting. But I should have to change nntplib, should I
> not? That I should use queues, is obvious. Should I insert enqueueing (?)
> at the position I marked in my first posting?
>
> Maybe the best solution would be to use QSockets (as I work with PyQt). Then
> I can use Qt signaling in a very natural way. I could create a new,
> asynchronous version of nntplib, that works with Qt signals (and this seems
> easy as nntplib is nicely documented and clear). What do you think of this?
You could also consider switching to Twisted
(http://www./twistedmatrix.com) for the networking part of your
application. It's an asynchronuous networking framework which includes
support for NNTP clients and servers. I personally haven't yet grokked
the async world view, but I've started to try writing a NNTP proxy with
it.
Gerhard
--
mail: gerhard <at> bigfoot <dot> de registered Linux user #64239
web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id AD24C930
public key fingerprint: 3FCC 8700 3012 0A9E B0C9 3667 814B 9CAA AD24 C930
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))
More information about the Python-list
mailing list