hex to bin 16 bit word
python
w.g.sneddon at gmail.com
Fri Apr 27 14:42:24 EDT 2012
More information about the Python-list mailing list
Fri Apr 27 14:42:24 EDT 2012
- Previous message (by thread): setting an array element with sequence problem problem
- Next message (by thread): hex to bin 16 bit word
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Is there an other way to do this?
What to decode hex '0xC0A8' and return signed short int.
>>> struct.unpack('>h','\xC0\xA8')
(-16216,)
Above works just wondering if there is cleaner way without writing a
function.
Bill
- Previous message (by thread): setting an array element with sequence problem problem
- Next message (by thread): hex to bin 16 bit word
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list