(block_num, block_size, total_size)
Print progress on urlretrieve's reporthook
Print progress on urlretrieve's reporthook
Print progress on urlretrieve s reporthook
def _print_urlretrieve_progress(block_num, block_size, total_size):
    """Print progress on urlretrieve's reporthook"""
    downloaded = block_num * block_size
    progress = 100 * downloaded / total_size
    if (total_size > 0):
        print("Download progress: {:4.1f}%".format(progress), end='\r')
        if (progress >= 100):
            print("")
def _print_urlretrieve_progress ( block_num , block_size , total_size ) : downloaded = block_num * block_size progress = 100 * downloaded / total_size if ( total_size > 0 ) : print ( "Download progress: {:4.1f}%" . format ( progress ) , end = '\r' ) if ( progress >= 100 ) : print ( "" )