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

Опубликовано: 15 Июнь 2020
на канале: Anshuman Biswal
8,951
77

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


На этой странице сайта вы можете посмотреть видео онлайн Opening Files Directory in TKinter and Python - Python Tutorial (2020) #15 длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Anshuman Biswal 15 Июнь 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 8,951 раз и оно понравилось 77 зрителям. Приятного просмотра!