parameters: (total_size)
docstring: Shows download status.
docstring_summary: Shows download status.
docstring_tokens: Shows download status .
function: def show_status_bar(total_size):
      """Shows download status."""
      q = show_status_bar.q
      total_size = total_size / (1024*1024)
      downloaded = 0
      while downloaded < total_size:
          try:
              o = q.get(timeout=20)
              downloaded += 1
              print('\r      %d/%d MB     %d%%     ' % (downloaded, total_size, 100*downloaded/total_size), end=' ')
              sys.stdout.flush()
          except Empty:
              time.sleep(1)
              break
function_tokens: def show_status_bar ( total_size ) : q = show_status_bar . q total_size = total_size / ( 1024 * 1024 ) downloaded = 0 while downloaded < total_size : try : o = q . get ( timeout = 20 ) downloaded += 1 print ( '\r      %d/%d MB     %d%%     ' % ( downloaded , total_size , 100 * downloaded / total_size ) , end = ' ' ) sys . stdout . flush ( ) except Empty : time . sleep ( 1 ) break