Ritesh Raj Sarraf wrote: [...] > Here's the function, download_from_web() which calls the progress bar: > main.py > def download_from_web(sUrl, sFile, sSourceDir, checksum): [...] > temp = urllib2.urlopen(sUrl) > headers = temp.info() > size = int(headers['Content-Length']) > data = open(sFile,'wb')
Incidentally, not all HTTP responses with bodies have a 'Content-Length' header. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list