有勇气的牛排博客

pyhon取文件md5值

有勇气的牛排 427 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')

评论区

×
×