parameters: (work_path, files_with_urls)
return_statement: return size_to_download, files_to_download
docstring: Returns file list to download and total size to download.
docstring_summary: Returns file list to download and total size to download.
docstring_tokens: Returns file list to download and total size to download .
function: def get_size_to_download(work_path, files_with_urls):
      """Returns file list to download and total size to download."""
      opener = build_opener(X509CertOpen())
      size_to_download = 0
      files_to_download = []
      for filename, url in files_with_urls:
          url_file = opener.open(Request(url))
          size = int(url_file.headers["Content-Length"])
          file_path = join(work_path, filename)
          if exists(file_path) and getsize(file_path) / 1024 == size / 1024:
              print("Exists on disk %s." % filename)
          else:
              size_to_download += size
              files_to_download.append(url)
      return size_to_download, files_to_download
function_tokens: def get_size_to_download ( work_path , files_with_urls ) : opener = build_opener ( X509CertOpen ( ) ) size_to_download = 0 files_to_download = [ ] for filename , url in files_with_urls : url_file = opener . open ( Request ( url ) ) size = int ( url_file . headers [ "Content-Length" ] ) file_path = join ( work_path , filename ) if exists ( file_path ) and getsize ( file_path ) / 1024 == size / 1024 : print ( "Exists on disk %s." % filename ) else : size_to_download += size files_to_download . append ( url ) return size_to_download , files_to_download