MD5_Hash.py 文件源码

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

项目:py3_project 作者: tjy-cool 项目源码 文件源码
def find_file(self, event):
        ''' ????????? '''
        dlg = wx.FileDialog(None, "???????",
                            os.getcwd(),
                            defaultFile="",
                            style=wx.FD_OPEN | wx.FD_MULTIPLE
                            )  # wildcard=wildcard
        info = ""
        self.totle_gauge.SetValue(0)
        if dlg.ShowModal() == wx.ID_OK:
            self.file_cnt = len(dlg.GetPaths())
            self.totle_gauge.SetRange(100 * self.file_cnt)

            tol_size = 0
            for path in dlg.GetPaths():
                tol_size += os.stat(path).st_size

            for index, path in enumerate(dlg.GetPaths()):    # ????????
                self.sigle_gauge.SetValue(0)
                if self.version_box.GetValue():
                    info += "???" + path + "\n"

                file_info = self.getfile_info(path)
                info += "???" + str(file_info[0]) + "??\n"
                if self.time_box.GetValue():
                    info += "?????" + file_info[1] + "\n"

                md5 = self.gethash_info(path, index)
                if self.md5_box.GetValue():
                    info += "MD5?" + md5[0] + "\n"
                if self.sha1_box.GetValue():
                    info += "SHA1?" + md5[1] + "\n"
                if self.crc32_box.GetValue():
                    info += "CRC32?" + md5[2] + "\n"

                info += "\n"
                # self.sigle_gauge.SetValue(100)
                # self.totle_gauge.SetValue(100 * (index + 1))

        self.t1.SetValue(info)
        # print(info)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号