Module for network related operations.
get(url, fileobj, progress_hook=None)¶
Perform a GET request against a URL writing the contents into the provideded file like object.
- url – The URL to fetch
- fileobj – The fileobj to write the content to
- progress_hook – The function to call with progress updates
Returns a tuple containing the number of bytes read and the result of the info() function from urllib2.urlopen().
Exceptions from urllib2.urlopen() and writing to the provided fileobj may occur.