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
Sur cette page du site, vous pouvez voir la vidéo en ligne Opening Files Directory in TKinter and Python - Python Tutorial (2020) #15 durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Anshuman Biswal 15 juin 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 8,951 fois et il a aimé 77 téléspectateurs. Bon visionnage!