realtime output and csv files

2016-02-05 Thread lucan
I'm new of python adn I'm using it only to complete some experiments. I'm reading a series of data from various sensors and in the meantime I'm writing datas on a file. I would like to print output in realtime (or refresh it when I need) but the problem is that I'm writing on a file every x sec

Re: realtime output and csv files

2016-02-05 Thread lucan
What do you mean? What is "datas"? What do you mean by "correct"? "datas" I mean the values for example temperature = 20.4 (so they are floating point) Index time temp 1 10:24 20.4 2 10:25 20.6 ... I wonder if this is correct "my way" to write a csv file: file.write('\n'+str(index)) f.wr

Re: realtime output and csv files

2016-02-06 Thread lucan
I wouldn't be surprised if a parser treated a value as text only because it has spaces on it. For OP, if you are going for this, I - personally - suggest sticking to "%d,%2d:%2d,%.1f". you're rightin fact importing datas in spreadsheet I've had some problems. I'll follow this suggestion. tnk