本文参考其他文章
先上代码
放C:\Users\hs\AppData\Local\Programs\Python\Python37\Lib\add_module\alive_progressbar\p_b.py
import add_module.printcolor.change_color as change_color
import time
def a_process_bar(percent, logo, start_str='', str_bar='>', end_str='', total_length=0):
bar = change_color.color.green(''.join([str_bar] * int(percent * total_length)) + '')
bar = '\r' + start_str + '[' + bar.ljust(total_length) + '] '+ logo +' '+change_color.color.red('{:0>4.1f}%|').format(percent*100) +end_str
print(bar, end='', flush=True)
def c_logo(logoframe=None,order=1):
if type(logoframe) == list:
return logoframe
else:
if order == 1:
return list(' wait a moment ')
if order == 2: