def download_files(source_url, file_names, target_path):
    'Mirror file_names from source_url to target_path.'
    _maybe_create_dir(target_path)
    pbar = ProgressBar()
    print(('Downloading %s ...' % source_url.split('/')[(- 1)]))
    for filename in pbar(file_names):
        _maybe_create_dir(os.path.join(target_path, os.path.dirname(filename)))
        if (not os.path.exists(os.path.join(target_path, filename))):
            download_url = ((source_url + '/') + filename)
            src = urlopen(download_url)
            with open(os.path.join(target_path, filename), 'wb') as dst:
                dst.write(src.read())
Mirror file_names from source_url to target_path.
def download_files(source_url, file_names, target_path):
    
    _maybe_create_dir(target_path)
    pbar = ProgressBar()
    print(('Downloading %s ...' % source_url.split('/')[(- 1)]))
    for filename in pbar(file_names):
        _maybe_create_dir(os.path.join(target_path, os.path.dirname(filename)))
        if (not os.path.exists(os.path.join(target_path, filename))):
            download_url = ((source_url + '/') + filename)
            src = urlopen(download_url)
            with open(os.path.join(target_path, filename), 'wb') as dst:
                dst.write(src.read())