pyserial: failed to readlines() after many hours running.
zxo102
zxo102 at gmail.com
Sat Oct 11 21:31:47 EDT 2008
On 10月12日, 上午1时13分, Terry Reedy <tjre... at udel.edu> wrote:
> Unknown wrote:
> > On2008-10-11,zxo102<zxo... at gmail.com> wrote:
>
> >> I have a system. An instrument attched to 'com1' is wireless connected
> >> to many sensors at different locations. The instrument can forward
> >> the "commands" (from pyserial's write()) to those sensors. Based on
> >> the "commands", the sensors keep sending corresponding data back to
> >> the instrument which wraps up those data and put into "com1" . The
> >> readlines() of pyserial pick up those data for processing.
> >> The data ?string' does not have "\n".
>
> Do you have the option of having the instrument insert them between
> readings?
>
>
>
> > If the data you're reading doesn't contain "\n", then you can't
> > use readline() or readlines().
>
> Use .read() instead.
I can not have the instrument insert "\n" between readings. That is
out of my control. I can try read(). Thanks.
Ouyang
More information about the Python-list
mailing list