def save_file(self, event):
'''??????????? '''
wildcard = "Text Files (*.txt)|*.txt|" "All files (*.*)|*.*"
dlg = wx.FileDialog(None, u"???????",
os.getcwd(),
defaultFile="",
style=wx.FD_SAVE, # |wx.FD_OVERWRITE_PROMPT
wildcard=wildcard
)
if dlg.ShowModal() == wx.ID_OK:
filename = dlg.GetPath()
with open(filename, 'w', encoding='utf-8') as f:
f.write(self.t1.GetValue()) # ??????????????
评论列表
文章目录