Opening Files Directory in TKinter and Python - Python Tutorial (2020) #15

Anshuman Biswal
Anshuman Biswal
8.9 هزار بار بازدید - 4 سال پیش - Python Tkinter (and TK) offer
Python Tkinter (and TK) offer a set of dialogs that you can use when working with files. By using these you don’t have to design standard dialogs your self. Example dialogs include an open file dialog, a save file dialog and many others. Besides file dialogs there are other standard dialogs, but in this article we will focus on file dialogs. File dialogs help you open, save files or directories. This is the type of dialog you get when you click file,open. This dialog comes out of the module, there’s no need to write all the code manually. Tkinter does not have a native looking file dialog, instead it has the customer tk style. You can see these below. The file dialog will work on all desktop platforms. import tkinter.filedialog tkinter.filedialog.asksaveasfilename() tkinter.filedialog.asksaveasfile() tkinter.filedialog.askopenfilename() tkinter.filedialog.askopenfile() tkinter.filedialog.askdirectory() tkinter.filedialog.askopenfilenames() tkinter.filedialog.askopenfiles() #python2020 #tkintergui #madaboutpython #tkintertutorial #tkinterprojects #tkinterinpython #tkinterguitutorial
4 سال پیش در تاریخ 1399/03/26 منتشر شده است.
8,948 بـار بازدید شده
... بیشتر