[Tutor] urllib.urlretrieve ?
Alan Gauld
alan.gauld at btinternet.com
Sun Apr 7 17:31:14 CEST 2013
On 07/04/13 16:07, Matthew Ngaha wrote:
> an equivalent function to 'urlretrieve' in Python 3? the program uses
> this function to download a file as so:
>
> urllib.urlretrieve(self._url, self._filename, reporthook)
>
Looking in the V3 documents on the Python web site it says:
==============
The following functions and classes are ported from the Python 2 module
urllib (as opposed to urllib2). They might become deprecated at some
point in the future.
urllib.request.urlretrieve(url, filename=None, reporthook=None, data=None)
Copy a network object denoted by a URL to a local file...
===============
Look in the module docs for urlib.request.
HTH
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list