realtime output and csv files

lucan lucan at NNN.it
Fri Feb 5 16:09:12 EST 2016


> 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.write(str(index)+','+str(now.hour)+':'+str(now.minute)+','+str(temp))

Or if there is a better way to do that.

> CSVs is essentially text separated by commas, so you likely do not need
> any library to write it "Just separating with ','" should work if you
> are formatting them correctly.

ok.



More information about the Python-list mailing list