Flask-memcache-session icon indicating copy to clipboard operation
Flask-memcache-session copied to clipboard

encode('hex') doesn't exist for bytes in python3

Open Cypher1 opened this issue 8 years ago • 3 comments

Might be able to make use of something similar to the following to get around this but I'm not sure about backwards compatability.

print ''.join('{:02x}'.format(x) for x in os.urandom(40))

From: https://stackoverflow.com/questions/19210414/byte-array-to-hex-string

Cypher1 avatar Jun 02 '17 23:06 Cypher1

or use six

kalloc avatar Jun 02 '17 23:06 kalloc

@Cypher1 can you make pull request please.

russian-developer avatar Jan 25 '18 19:01 russian-developer

Do you have unit tests for this? If so I might be able to but haven't used this project in quite a while.

Cypher1 avatar Jan 26 '18 12:01 Cypher1