Thanks Rob.
Yes I ended up with a read(1) and use a field count and a few other checks to
make sure I don't get a partial record. Serial is the "best of times and worst
of times". Sure beats dealing with USB enumeration, power hungry ethernet
processors and a lot of other stuff. I can still "s
On 07/18/2017 12:53 PM, FS wrote:
Thank you for your response Andre. I had tried some code like that in the
document but it did not seem to work. However ever leaving my terminal for a
time the code eventually wrote out the records so apparently there is some very
deep buffering going on here.
Thank you for your response Andre. I had tried some code like that in the
document but it did not seem to work. However ever leaving my terminal for a
time the code eventually wrote out the records so apparently there is some very
deep buffering going on here. A little more searching on the web
Just take a look into the documentation:
https://docs.python.org/3/library/io.html#io.TextIOWrapper
And in the example of Pyserial:
http://pyserial.readthedocs.io/en/latest/shortintro.html#eol
I think it shold be:
sio = io.TextIOWrapper(io.BufferedRWPair(ser, ser),
newline='yourline_ending')
But
I just started using Python and I am writing code to access my serial port
using pyserial. I have no problem with unix based text coming in the stream
using a LF (0x0A) record separator. I also am using unblocked IO. However I
have some sensor devices that use the windows CRLF (0x0A,0x0D) record