Python GUI Tutorial - 42 -FileDialogbox , asksaveasfile

preview_player
Показать описание
in this video you're going to learn how we can save a file (text file) using save as filedialogbox.
filedialogboxes are present in tkinter and also filedialogbox are very easy to use in tkinter.
and the package that we'll use to open filedialogbox is "from tkinter import filedialogbox"

so here is the code -

from tkinter import *
from tkinter import filedialog

def save_file():
if f is None:
return

root = Tk()

button = Button(root, text="save as", command=save_file)
---------------------------------------------------------------------------

so i am sure your queries like -
2. how to open save as dialog box in tkinter?
3. how to open filedialogbox to open a file?
4. save a text file using fildialogbox in tkinter's save as file dialog box.

have been solved.

if you have any query related to this video, then please comment below, we'll reply as soon as possible-

contact us -

Рекомендации по теме
Комментарии
Автор

sir you are doing a great job, please keep doing this amazing stuff.
Best regards.

zeeshanakram
Автор

Hello sir, this is really the most amazing video I have ever seen regarding the use of asksavefile(). Can you please help me with an issue? Instead of saving a .txt file, how can I save a .png image into a folder using asksavefile()?

rutujashinde
Автор

Hi sir, this video is really helping me. i wanted to open a xlsx file using browse button and operate some operation in using the data present xlsx file as input then the another one button should able to save the operation after this. can you please reply asap
thanks

sachinr
Автор

Is this can be done by kivy framework also??

nikitajaiswal
Автор

dear sir thansk for video, muchye root1 one say taxt puchye root2 or root3 per or photo bhi kaya karna ho ga sir pls tell me sir

gauravSingh-wsum
Автор

How to select multiple excel file using askopenfilenames and combine to one dataframe using tkinter

parajf
Автор

sir how to get the file directory that i have selected using this filedislog.asksaveasfile commad?

hikikomori
Автор

_tkinter.TclError: bad option "-mode": must be -confirmoverwrite, -defaultextension, -filetypes, -initialdir, -initialfile, -parent, -title, or -typevariable

marcosrojogomez
Автор

sir need you help. sir i am writing Unicode text to file using FileDialogbox, asksaveasfile method you teach us in this video, but the file is empty, althought it is fine when writing English text. And there is no Encoding option.

zeeshanakram
Автор

Is it possible to auto complete or put a file name when the file save dialog opens? I mean can it already be popped up with indrajeet.txt in the name and user doesn't need to enter the file name?

venkateshgotimukul
visit shbcf.ru