FileManagementPanel.py 文件源码

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

项目:beremiz 作者: nucleron 项目源码 文件源码
def OnDeleteButton(self, event):
        filepath = self.ManagedDir.GetPath()
        if os.path.isfile(filepath):
            folder, filename = os.path.split(filepath)

            dialog = wx.MessageDialog(self,
                                      _("Do you really want to delete the file '%s'?") % filename,
                                      _("Delete File"),
                                      wx.YES_NO | wx.ICON_QUESTION)
            remove = dialog.ShowModal() == wx.ID_YES
            dialog.Destroy()

            if remove:
                os.remove(filepath)
                self.ManagedDir.RefreshTree()
        event.Skip()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号