import urllib.request, urllib.error, urllib.parse


class HeadRequest(urllib.request.Request):

    def get_method(self):
        return 'HEAD'
url = 'http://sstatic.net/stackoverflow/img/sprites.png'
req = HeadRequest(url)
response = urllib.request.urlopen(req)
response.close()
print(respose.headers)
Download several parts of one file concurrently with Python?