config.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:cebl 作者: idfah 项目源码 文件源码
def saveMessages(self, event=None):
        """Save the message log to file.
        """
        saveDialog = wx.FileDialog(self.scrolledPanel, message='Save Message Log',
            wildcard='Text Files (*.txt)|*.txt|All Files|*',
            style=wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)

        try:
            if saveDialog.ShowModal() == wx.ID_CANCEL:
                return
            with open(saveDialog.GetPath(), 'w') as fileHandle:
                fileHandle.write(self.messageArea.GetValue())
        except Exception as e:
            wx.LogError('Save failed!')
            raise
        finally:
            saveDialog.Destroy()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号