askopenfilename
filename2 = filedialog.askopenfilename(title = "Select file",filetypes = (("Excel files", ".xlsx .xls"),))
askopenfilename
filename2 = filedialog.askopenfilename(title = "Select file",filetypes = (("Excel files", ".xlsx .xls"),))
python tkinter filedialog
from tkinter import filedialog
# Where it open to. # What the window is called. # What file types the user can choose between. first one is the defualt. (("what ever", "*.format"), ("what ever 2", "*.format2"))
filedialog.askopenfilename(initialdir=os.path.normpath("C://"), title="Example", filetypes =(("PNG", "*.png"),("JPG", "*.jpg"),("All Files","*.*")))
how to openn file dialog in tkinter
from tkinter import filedialog
text_file=filedialog.askopenfilename(initialdir="D:/IT related folders and documents/",title="Open Text File",filetypes=(("Text Files", "*.txt"),))
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us