我从tkinter ttk模块创建了一个进度栏小部件,还从Label小部件创建了状态栏来监视当前程序正在执行的任务。
以上所有小部件都在我正在执行指定任务的内部创建。 如果我直接调用该函数,则我的程序当前正在运行,但是如果我从单击按钮时调用的另一个函数内部调用该函数,则我的状态栏会动态变化。
尽管我用相同的参数调用相同的函数,但行为却有所不同。
from tkinter import Tk,Frame,Label,Entry,Button,StringVar,TOP,BOTH,SUNKEN,Menu,RAISED,CENTER,W,BOTTOM,X
from tkinter import filedialog
from tkinter.ttk import Combobox
from excel_operations import *
# from openpyxl.utils import get_column_letter
from tkinter import messagebox
import time
def funcexcel():
file1.excel_splitter(column_criteria,dest_file_dir,flter_type) #Same call
ource_file_path='D:\Khalak\Python\datatest.xlsx'
column_criteria='GR NO'
dest_file_dir=r'C:\Users\Manager-IT\Desktop\Python'
flter_type=1
file1=excel_operations(ource_file_path)
file1.excel_splitter(column_criteria,dest_file_dir,flter_type) #Same call