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
Auf dieser Seite können Sie das Online-Video Opening Files Directory in TKinter and Python - Python Tutorial (2020) #15 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Anshuman Biswal 15 Juni 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 8,951 Mal angesehen und es wurde von 77 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!