python tkinter filedialog dosya açma işlemi.
#initialdir= başlangıç dosya yolu.
#filetypes= dosya türünü belirler.
#title=diyalog penceresi başlığı.
kod:
from tkinter import *
from tkinter.filedialog import *
pencere=Tk()
pencere.geometry("600x400+650+100")
#initialdir= başlangıç dosya yolu.
#filetypes= dosya türünü belirler.
#title=diyalog penceresi başlığı.
def aç():
dosyaadı=askopenfilename(initialdir="/",
title="dosya aç",
filetypes=(("Text Files","*.txt"),("all files","*.*")))
print(dosyaadı)
lbl.config(text=dosyaadı)
lbl=Label(font="arial 15")
lbl.pack()
menucubugu=Menu(pencere)
#menu1
File=Menu(menucubugu,tearoff=0,font="arial 16 bold italic")
File.add_command(label="aç",command=aç)
menucubugu.add_cascade(label="File",menu=File)
pencere.config(menu=menucubugu)
pencere.mainloop()
On this page of the site you can watch the video online Filedialog Python Tkinter #49 with a duration of hours minute second in good quality, which was uploaded by the user Cebir Productions 25 March 2019, share the link with friends and acquaintances, this video has already been watched 220 times on youtube and it was liked by 3 viewers. Enjoy your viewing!