About python tkinter.filedialog I tried to set the file extension type, but no matter what I did,asksaveasfilename does not return the file type ,that is why? It is a bug in tkinter?
from tkinter import *
from tkinter.filedialog import *
root=Tk()
root.geometry('500x500')
path=asksaveasfilename(filetypes=(('Txt file','.txt'),('Python file','.py')))
print(path)
root.mainloop()
the result :
C:\Users\acer\Desktop\python>pythonfile
It has no extension type