A
Adam Ritter
When I try to convert an 8 digit hex number to an integer, I get a
ValueError. Why doesn't it convert back correctly? I have the string
'0xdeadbeaf' stored in a textbox and I would like it's integer value. I
would convert it to a long, but I need to pack it to send as a 4 byte
integer through a socket to a C program. Any ideas?
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: int() literal too large: 0xdeadbeaf
Nick
_________________________________________________________________
Enjoy MSN 8 patented spam control and more with MSN 8 Dial-up Internet
Service. Try it FREE for one month! http://join.msn.com/?page=dept/dialup
ValueError. Why doesn't it convert back correctly? I have the string
'0xdeadbeaf' stored in a textbox and I would like it's integer value. I
would convert it to a long, but I need to pack it to send as a 4 byte
integer through a socket to a C program. Any ideas?
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: int() literal too large: 0xdeadbeaf
Nick
_________________________________________________________________
Enjoy MSN 8 patented spam control and more with MSN 8 Dial-up Internet
Service. Try it FREE for one month! http://join.msn.com/?page=dept/dialup