Possible Duplicate:
Python urllib2 Progress Hook
I have a script which uploads a file with urllib2. I have the timeout set but i believe it wont go off if my transfer stalls. I'm wondering if there's anyway of monitoring the urllib2 transfer and make it abort if the transfer rate is below xx bytes/second.
Right now I use signal.alarm which is based on file size divided by a rough guess of what I think the transfer rate is but its not the best method.