Thanks Bela,
Forgot it was 3.4, last time I did python it was 2.7.
file.write('%s\n' %(data)) is what I needed.
It seems to append the data but I opened the file as w not w+
With \n I get a newline, without it is just get added at the end of the first line.
file.open...
file.write...
file.close...
Opening, writing then closing works, keeping the file open the data got appended.
All it is doing is storing an incrementing count value that websocketd then pushes to the browser.
I better brush up on 3.4 Python.
This also helped with sleeping python to save cpu cycles, no import time python library yet so I did this.
os.system('sleep ' '%s' %(sleeptime)), probably lose a bunch of cycles calling os.xxx but sleeptime is in seconds anyway.
Regards
Gavin