from tkinter import *
from tkinter.filedialog import askdirectory


def selectPath():
    path_ = askdirectory()
    path.set(path_)

root = Tk()
path = StringVar()

Label(root, text="目标路径:").grid(row=0, column=0)
Entry(root, textvariable=path).grid(row=0, column=1)
Button(root, text="路径选择", command=selectPath).grid(row=0, column=2)

root.mainloop()
2474787579c315ec6d310b75822dd2c9d4116d29
<mask token>

<mask token>


def selectPath():
    path_ = askdirectory()
    path.set(path_)


<mask token>

<mask token>


def selectPath():
    path_ = askdirectory()
    path.set(path_)


<mask token>
Label(root, text='目标路径:').grid(row=0, column=0)
Entry(root, textvariable=path).grid(row=0, column=1)
Button(root, text='路径选择', command=selectPath).grid(row=0, column=2)
root.mainloop()

<mask token>


def selectPath():
    path_ = askdirectory()
    path.set(path_)


root = Tk()
path = StringVar()
Label(root, text='目标路径:').grid(row=0, column=0)
Entry(root, textvariable=path).grid(row=0, column=1)
Button(root, text='路径选择', command=selectPath).grid(row=0, column=2)
root.mainloop()

from tkinter import *
from tkinter.filedialog import askdirectory


def selectPath():
    path_ = askdirectory()
    path.set(path_)

root = Tk()
path = StringVar()

Label(root, text="目标路径:").grid(row=0, column=0)
Entry(root, textvariable=path).grid(row=0, column=1)
Button(root, text="路径选择", command=selectPath).grid(row=0, column=2)

root.mainloop()