pyserial

Mimi m_massala at hotmail.com
Fri Feb 24 09:44:00 EST 2006


Thanks Peter,
 because you have understood my need: a little understanding of
readlines() function.

# Following snippets of code is running in infinitive loop, but it is
not
   necessary too be worried about processor utilization because the
   readline waits for the data on the serial port and the code
continues
   to run when data occurs or when timeout passes.
#

my python script tries to read a lot of data (the histograms)  and that
can take many times (3 min) to download one file. and data do not
arrived in the same time you can wait few seconds between data ( data
response for the same command).
do you think that readlines() function will wait until all data are
arrived or when the timeout expired ?
if the data take more time, the readlines() will wait or will break on
the timeout ?
with hyperterminal the data are echoed when they arrived and you can
see that they do not arrived all the same time.
the timeout is reset when the first data arrived or it is only ignored
?




More information about the Python-list mailing list