Equivalent of 'wget' for python?

r0g aioe.org at technicalbloke.com
Mon Dec 8 11:53:08 EST 2008


Robert Dailey wrote:
> Hi,
> 
> I'm looking for a portable way to download ZIP files on the internet
> through Python. I don't want to do os.system() to invoke 'wget', since
> this isn't portable on Windows. I'm hoping the core python library has
> a library for this. Note that I'll be using Python 3.0.
> 
> Thanks.


urllib.urlretrieve(url_of_zip_file, destination_on_local_filesystem).

There's also a third argument you can use to link a progress update
function of your choosing if you need it.


Roger.



More information about the Python-list mailing list