“TKINTER FILEDIALOG” Kode Jawaban

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","*.*")))
RyanGar46

Folder FileDialog Python Tkinter

from tkinter import filedialog

								# Where it open to.					# What the window is called.
folder = filedialog.askdirectory(initialdir=os.path.normpath("C://"), title="Example")
RyanGar46

askopenfilename

filename2 =  filedialog.askopenfilename(title = "Select file",filetypes = (("Excel files", ".xlsx .xls"),))
Fair Frog

TKINTER FILEDIALOG

from tkinter import filedialog
 
filedialog.asksaveasfilename()
filedialog.asksaveasfile()
filedialog.askopenfilename()
filedialog.askopenfile()
filedialog.askdirectory()
filedialog.askopenfilenames()
filedialog.askopenfiles()
Jerome Scott

TKINTER FileDialog FileName

def open_file():
    file = askopenfile(mode='r', filetypes=[
                       ('Text files', '*.txt'), ('CSV Files', '*.csv')])
    if file is not None:
        print(file.name.split("/")[-1]) # this will print the file name

btn = Button(root, text='Open', command=lambda: open_file())
btn.pack(side=TOP, pady=10)
stormerthe2nd

Jawaban yang mirip dengan “TKINTER FILEDIALOG”

Pertanyaan yang mirip dengan “TKINTER FILEDIALOG”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya