import urllib2 import urllib link="http://repo.tinycorelinux.net/6.x/x86/tcz/firefox.tcz" site=urllib.urlopen(link) meta=site.info() l1=int(meta.getheaders("Content-Length")[0]) print l1 hf=open("firefox.tcz","wb") step=1023 start=0 end=step while end