【发布时间】:2017-05-07 21:24:57
【问题描述】:
到目前为止,bat 运行但进度条没有运行。我如何将两者相互连接?这是输出的图像。 http://imgur.com/lKbHepS
from tkinter import *
from tkinter import ttk
from subprocess import call
def runBat():
call("mp3.bat")
root = Tk()
photobutton3 = PhotoImage(file="smile.png")
button3 = Button(root, image=photobutton3, command=runBat)
button3.grid()
pbar = ttk.Progressbar(root, orient=HORIZONTAL, length=200, mode='determinate')
pbar.grid()
root.mainloop()
【问题讨论】:
-
批处理文件是否打印完成百分比?
-
批处理文件确实不断告诉我完成了多少百分比。
-
百分比的格式是什么?
标签: python-3.x tkinter tk ttk