[Twisted-Python] Large Transfers

Glyph Lefkowitz glyph at twistedmatrix.com
Sat May 10 09:34:59 MDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Saturday, May 10, 2003, at 10:20 AM, Uwe C. Schroeder wrote:

> The pager makes it hard to give the user some response while 
> uploading/downloading.

You have got this exactly backwards.  If you want to implement 
upload/download notification of some sort (let's say, a progress bar) 
then you are going to need something that looks like a pager, and if 
one didn't exist you would have to write it yourself.

Now, for a progress bar, you will need to write your own pager, since 
you'll need to hook into the 'data received' notifications that you 
get; but this could be a trivial subclass of CallbackPageCollector.  
getAllPages won't work for you at that point, but it is only 3 lines of 
code; not a terrible burden to rewrite.

> The UI gets stuck,

Unless you have an intentionally broken UI, this is not true.  The 
event loop will be running and data-received callbacks will be 
happening, so nothing is "stuck".

> or at least appears to be since nothing is happening.

No visible indication of progress, you mean.  What would be happening 
if PB *weren't* paging?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (Darwin)

iD8DBQE+vRwsvVGR4uSOE2wRApruAJoDetOe+E3HHXfxedqXsL2BouORdwCghG6y
VMf66WttRikqww924stdVcw=
=4j7Y
-----END PGP SIGNATURE-----





More information about the Twisted-Python mailing list