I am using
wx.FileDialog to pop a directory select dialog for the user to choose the save path. The file type I'd like to save is
Here is the code:
fdlg = wx.FileDialog(self.panel_settings, "Input setting file path", "", "", "CSV files(*.csv)|*.*", wx.FD_SAVE) if fdlg.ShowModal() == wx.ID_OK: self.save_path = fdlg.GetPath() + ".csv" with open(self.save_path, "wb") as file: writer = csv.writer(file, delimiter = ',')
When a dialog pops up, I simply type in
test as the file name. As I click
OK button, it directly save an empty
However, what I want to do is just keep the input path and file name, then write the content myself.
So, may I know how to work around this?