from tkinter import filedialog, Tk r = Tk() r.withdraw() print(filedialog.askopenfilename()) r.destroy()