Ejemplo 1: askopenfilename
filename2 = filedialog.askopenfilename(title = "Select file",filetypes = (("Excel files", ".xlsx .xls"),))
Ejemplo 2: ejemplo de tkfiledialog python 3
from tkinter import *
root = Tk()
root.filename = filedialog.askopenfilename(initialdir = "E:/Images",title = "choose your file",filetypes = (("jpeg files","*.jpg"),("all files","*.*")))
print (root.filename)
root.withdraw()
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)