tkinter 获取变量的简单问题
我是想在GUI界面选择目标EXCEL路径,然后再在pthon中取得这个路径进行处理
比如这个askpath就是路径,怎么在后续的自定义方法中(我定义了个pandas方法进行处理这个excel)引用这个askpath
现在怎么引用这个选择的askpath
求大神指导
from tkinter.filedialog import *
import tkinter.filedialog
def selectPath():
askpath = tkinter.filedialog.askopenfilename()
path.set(askpath)
askpath = tkinter.filedialog.askopenfilename()
然后可以
pd.read_excel(askpath)