>>> hex(struct.unpack('>H', struct.pack('>h', -200))[0])
'0xff38'
-200 2- int. unsigned 2- int. 65336, hex ff38
0-255, :
>>> struct.unpack('>BB', struct.pack('>h', -200))
(255, 56)
>>> struct.unpack('>BB', struct.pack('>h', 200))
(0, 200)
Requisite struct