Answers for "how to create open file dialog in python"

4

askopenfilename

filename2 =  filedialog.askopenfilename(title = "Select file",filetypes = (("Excel files", ".xlsx .xls"),))
Posted by: Guest on September-13-2020
1

how to open file dialog in pytohn

from tkinter import Tk
from tkinter.filedialog import askopenfilename

Tk().withdraw() # Added so Tk window doesn't appear on opening the dialog
filePath = askopenfilename() # Full pile will be returned as string
Posted by: Guest on March-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language