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

Question:

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?

Asked By: evgeny

||

Answers:

Answered By: acw1668
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.