hex -> 16bit signed int (newbie)

zif zf_acs at DELETETHIShotmail.com
Tue Apr 15 07:18:36 EDT 2003


How can I get 16bit signed int from a hex string?
Eval('0x...') gives me 16bit unsigned,
struct.pack('i', '\x..\x..') works fine, but
Python doesn't allow me to concatenate strings
with '\' (str(92) gives me '\\', which doesn't
work as well).

Thanks.






More information about the Python-list mailing list