At Wednesday 23/8/2006 15:32, Jiang Nutao wrote:

This is what I got in the debugger:

(Pdb) aa=array('b', [126, 55, 71, 112])
(Pdb) aa
array('b', [126, 55, 71, 112])
(Pdb) aa.byteswap()
(Pdb) aa
array('b', [126, 55, 71, 112])

Oh, sorry, to swap by two bytes "H" was the right typecode. But your input array should be:
    aa = array('H', [0x1234, 0x5678])
which should give:
        array('H', [0x3412, 0x7856])



Gabriel Genellina
Softlab SRL

        
        
                
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! http://www.yahoo.com.ar/respuestas

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

Reply via email to