On Fri, 22 Mar 2019, at 00:53, Martin McCormick wrote: > Opening, appending and closing for each new line of > output made me a bit squeamish. ...
You could always count lines written and do a close & reopen every (say) 1000 lines. That way there's less overhead but the amount of data you might lose is reduced. -- Jeremy Nicoll - my opinions are my own.