有勇气的牛排博客

pyhon取文件md5值

有勇气的牛排 303 Python 2023-05-18 20:56:53

filename = '../static/tmpImg/6.jpg' if (filename): print(filename) fp = open(filename, 'rb') contents = fp.read() fp.close() print(hashlib.md5(contents).hexdigest()) else: print('file not exists')

留言

专栏
文章
加入群聊