Fw: [Tutor] Re: BCD Ascii to a binary hex value CHANGED

Deirdre Hackett Deirdre Hackett" <deirdrehac@lycos.co.uk
Mon Feb 24 10:05:04 2003


> I want to apologise if my question was unclear. I was pretty hazy as to
what
> i wanted to find out myself.
>
> However, I did find the answer to my question.
>
> You use the struct module to pack and unpack binary data.
>
> struct.unpack('>hhhc', input_string)
>
> input string contains 6 hex values and a carriage return. The hex values
> represented 3 signed values between -32,767 and +32,767.
>
>
>