Sublime Forum

Why hashlib isn't working properly in custom_python_2.x build in sublime text 3 while it operates fine in python 2 shell

#1

the hexdigest() works fine but why digest() function doesn’t works

import hashlib
m=hashlib.md5()
m.update(b’wow’)
m.update(b’how’)
print m.digest()
print m.hexdigest()

Output:
this line is blank which should be the output of digest()
26b6136337b0517956b3360094f11945

the snippet for python 2.x is this:

{
“cmd”: [“C:\Python27\python”, “-u”, “$file”],
“file_regex”: “^[ ]File "(…?)”, line ([0-9]*)",
“selector”: “source.python”,
“shell”: true
}

0 Likes