Programming tricks related to ActionScript, Python, C/C++ and Java. See the comments for answers.
The trick is to use built-in long/int in Python to typecast from a string representation of the number in Hex. Writing Hex representation from binary representation is straight forward.bin2int = lambda x: long(''.join('%02x'%(ord(a)) for a in x), 16)
Post a Comment