Calculating Download Rate

Gabriel Genellina gagsl-py at yahoo.com.ar
Fri Jan 5 08:28:40 EST 2007


At Friday 5/1/2007 08:53, placid wrote:

>I want be able to work the download rate for downloading HTML pages
>using the urllib.urlopen(url). The way i thought i would do this is
>start a timer (or log the current time) just before calling this
>function and the stopping the timer (logging the current time again and
>the working out the difference) this would give me duration that it
>took to retrieve the web-page, not the download rate?

Then, the download rate in bytes/sec would be (size of page in 
bytes)/(time elapsed in seconds)


-- 
Gabriel Genellina
Softlab SRL 


	

	
		
__________________________________________________ 
Preguntá. Respondé. Descubrí. 
Todo lo que querías saber, y lo que ni imaginabas, 
está en Yahoo! Respuestas (Beta). 
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas 




More information about the Python-list mailing list