如下所示:
from tkinter import *
import time
#更新进度条函数
def change_schedule(now_schedule,all_schedule):
canvas.coords(fill_rec, (5, 5, 6 + (now_schedule/all_schedule)*100, 25))
root.update()
x.set(str(round(now_schedule/all_schedule*100,2)) + '%')
if round(now_schedule/all_schedule*100,2) == 100.00:
1