Re: how to read serial stream of data [newbie]

In article
Jean Dupont <jeandupont115@xxxxxxxxx> wrote:

I'd like to read in a stream of data which looks like this:
the device sends out a byte-string of 11 bytes roughly every second:


As you see every string is ended by 0D8A
How can this be accomplished in Python?

The basic idea would be to open your datastream in binary mode
(, then use read(11)
to read exactly 11 bytes into a string.

Depending on what the 11 bytes are, you might want to use the struct
module ( to extract the data
in a more useful form.