简体   繁体   中英

How to let a user save a file in a directory?

I am trying to create a "save as" button using tkinter. For that, I want to let the user choose a directory and a name for the file. The file will be a dictionary converted into a json file. I understand that I can create a browse button for it using filedialog.askdirectory but the problem is, I dont know how can I let the user choose the name of his save file. Does anyone know how to do that?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM