It appears to be correct for positive numbers.

if conval >= 2**16:
   conval -= 2**32

would appear to patch things up.

It's not very pretty, though. You could at least start with

input1 = [c_ushort(item) for item in input]

instead of your first 9 lines.

mt

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

Reply via email to