Converting 2bit hex representation to integer ?

M

Madhusudan Singh

Hi

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). How do I
convert the resulting two bit representation into an integer ?

Thanks.
 
L

Leif K-Brooks

Madhusudan said:
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top