how to download a zip or rar file to local machine using python?

dongdong dongdonglove8 at hotmail.com
Wed Mar 8 06:22:27 CET 2006


I wrote as following:
  content=urllib2.urlopen("http://www.sdfagfa.org/asasg/a.zip").read()
  f=open("d:\\a.zip",'a+',1)
  f.writelines(content)

the zip file has been download to my machine,but when be unzip , error
occurs:
" there is an  error at the end of the file"




More information about the Python-list mailing list