[Twisted-Python] POP3 improvements

screwtape at froup.com screwtape at froup.com
Tue Dec 31 18:21:07 EST 2002


On Tue, Dec 31, 2002 at 02:53:43PM +0200, Tommi Virtanen wrote:
> On Tue, Dec 31, 2002 at 06:08:22PM +1100, screwtape at froup.com wrote:
> > I think it would be nice if Twisted had a DownloadingFile interface or
> > something - make a new DownloadingFile instance, then pass it to FTP's
> > RETR, HTTP's GET, an IRC DCC transfer, a twisted.conch scp session, or
> > whatever. Then you can get the DownloadingFile instance to trigger
> > deferreds when it's complete, when it's progress is updated, that sort
> > of thing. It would make it easy to generate stats like download speed,
> > estimated time, and so forth.
> 
> 	How does that differ from the normal file interface?
> 
> 	f.write(somestuff)
> 	f.write(somestuff)
> 	f.write(somestuff)
> 	f.close()

Because I still think of a file as a type, not an object. *sigh*

You're right, file objects would be good. At any rate using Protocols
would seem like overkill.

-- 
 ___________ ____________________________
| Screwtape | Reply-To: munged on Usenet |________ ______ ____ __ _  _   _
|
| "Universe-flavored. What you mortals call `butterscotch'." -- T&R, 1999-09-17
|




More information about the Twisted-Python mailing list