read 9 bytes

Tim Roberts timr at probo.com
Mon Jun 11 08:39:52 CEST 2007


nik <nikbaer at gmail.com> wrote:
>
>I need to read a 9 byte response from a device on the serial port.
>From reading the pySerial documentation it appears that I can only
>read in characters at a time.

Yes, but it is 8-bit characters.  That is, characters == bytes in this
instance.


>If I do: serialport.read(4)
>I would get 8 bytes,

No.  You would get 4 bytes.  Do you see documentation to the contrary?
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list