How to select a directory and store the location using tkinter in Python How to select a directory and store the location using tkinter in Python tkinter tkinter

How to select a directory and store the location using tkinter in Python


It appears that tkFileDialog.askdirectory should work. documentation


This code may be helpful for you.

from tkinter import filedialogfrom tkinter import *root = Tk()root.withdraw()folder_selected = filedialog.askdirectory()