(self, url, dest)
Downloads a file at the url to the destination.
Downloads a file at the url to the destination.
Downloads a file at the url to the destination .
def download_file(self, url, dest):
        """
        Downloads a file at the url to the destination.
        """
        print('Attempting to retrieve remote jar {url}'.format(url=url))
        try:
            response = urlopen(url)
            with open(dest, 'wb') as dest_file:
                shutil.copyfileobj(response, dest_file)
            print('Saving {url} -> {dest}'.format(url=url, dest=dest))
        except Exception as e:
            print('Failed to retrieve {url}: {e}'.format(url=url, e=e))
            return
def download_file ( self , url , dest ) : print ( 'Attempting to retrieve remote jar {url}' . format ( url = url ) ) try : response = urlopen ( url ) with open ( dest , 'wb' ) as dest_file : shutil . copyfileobj ( response , dest_file ) print ( 'Saving {url} -> {dest}' . format ( url = url , dest = dest ) ) except Exception as e : print ( 'Failed to retrieve {url}: {e}' . format ( url = url , e = e ) ) return