Hi Kamilche,

Aside from the 7bit confusion you should take a look at the 'struct'
module. I bet it will simplify your life considerably.

#two chars
>>> import struct
>>> struct.pack('cc','A','B')
'AB'

#unsigned short + two chars
>>> struct.pack('Hcc',65535,'a','b')
'\xff\xffab'


Cheers
Lars

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to