read 9 bytes

Grant Edwards grante at
Mon Jun 11 18:21:05 CEST 2007

On 2007-06-11, nik <nikbaer at> 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.

bytes are the same thing as characters.

> If I do:
> I would get 8 bytes,

No, you'd get 4.  Just try it and see.  That would be way
faster and easier than waiting for answers from Usenet.

> and if I did I think the port will block
> until a time out,

It would read 5 bytes if available, otherwise it would block
until a timeout.

> since there
> Is there a trick to read 9 bytes off of a serial port?

Please tell us what happened when you tried the obvious:

Grant Edwards                   grante             Yow! Do I have a lifestyle
                                  at               yet?

More information about the Python-list mailing list