Load file from FileDialog : FileDialog « Tkinker « Python Tutorial






Load file from FileDialog
from Tkinter import *
import tkFileDialog
def openwindows():
    statusbar.config(text = open.show())

root = Tk()
myfiletypes = [('Python files', '*.py'), ('All files', '*')]
open = tkFileDialog.Open(root, filetypes = myfiletypes)
Button(root, text="Open File Dialog", command=openwindows).pack()

statusbar = Label(root, text="", bd=1, relief=SUNKEN, anchor=W)
statusbar.pack(side=BOTTOM, fill=X)
root.mainloop()








18.13.FileDialog
18.13.1.Load file from FileDialogLoad file from FileDialog