code: def download_file(url):
    
    try:
      (local_file, headers) = urllib.urlretrieve(url)
    except:
      sys.exit("ERROR: Problem downloading config file. Please check the URL (" + url + "). Exiting...")
    return local_file
docs: Download a file pointed to by url to a temp file on local disk
  
    :param str url:
    :return: local_file