[Chicago] control bandwidth speed in urllib2?

Feihong Hsu hsu.feihong at yahoo.com
Wed Nov 5 05:05:20 CET 2008

I hesitate to say it's not possible, but I don't think there's an easy way to do it. You could try looking at the Kamaelia library. I think there is a class in there that is specifically designed to limit the download/upload speed (forget what it's called though). And of course Twisted is always an option.

--- On Tue, 11/4/08, Lukasz Szybalski <szybalski at gmail.com> wrote:
From: Lukasz Szybalski <szybalski at gmail.com>
Subject: [Chicago] control bandwidth speed in urllib2?
To: "The Chicago Python Users Group" <chicago at python.org>
Date: Tuesday, November 4, 2008, 9:31 PM

I was wondering if anybody implemented or knows how to implement
bandwidth speed limit in urllib2.

I need to control how fast urls are downloaded at some consistent rate.

One solution is to sleep for x seconds until average rate is achieved,
but that causes spikes of high bandwidth/no bandwidth.  Is there a way
to make urllib2 use 5kb/s constant speed at all times.


Turbogears2 Manual
Bazaar and Launchpad
Chicago mailing list
Chicago at python.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20081104/2865eabc/attachment.htm>

More information about the Chicago mailing list