So you know how when you use Notepad (on Windows), for example, and you want to open an old file? You click file, then open, then a file dialog opens ups and you can select
import tkinter as tk from tkinter import filedialog def UploadAction(event=None): filename = filedialog.askopenfilename() print('Selected:', filename) root = tk.Tk() button = tk.Button(root, text='Open', command=UploadAction) button.pack() root.mainloop()