Converting 2bit hex representation to integer ?

Leif K-Brooks eurleif at ecritters.biz
Wed Oct 19 18:05:23 EDT 2005


Madhusudan Singh wrote:
> I am using binascii.b2a_hex to convert some binary data to hex. The
> result is a two bit hex representation (i. e., without the leading
> 0x).

Surely you mean two-byte?

> How do I convert the resulting two bit representation into an integer
> ?

int(foo, 16)



More information about the Python-list mailing list