I want to analyse a temp file (it has the .txt extension) in real time. Temp file has format:
6000 -64.367700E+0 19.035500E-3
8000 -64.367700E+0 18.989700E-3
However after importing & printing it is not a matrix as I hoped, but actually has format:
'6000\t-64.367700E+0\t19.035500E-3\n8000\t-64.367700E+0\t18.989700E-3'
I tried importing line by line, but since it's in string format I couldn't get xreadlines()
or readlines()
to work. I can split the string, then separate the data into an appropriate list for analysis, but are there any suggestions to only deal with new data. As the file gets larger it will slow the code down to reprocess all the data regularly and I can't work out how to replicate an xreadlines()
loop.
Thanks for any help