I am trying to write the conclusion of what is being done on three large iterations, and every time I open and close the outfile. Counters get reset and similar things after iterations, and I'm a massive newb, and I will fight for it with the insidious code that I wrote. Therefore, even if it is slower, I would like to change the way it is output.
Currently, for output, it simply rewrites on the first line, so I only have the output of the last program run. (tau, output - variables, given values ββin iterations above in the code)
with open(fileName + '.autocorrelate', "w") as outfile: outfile.writelines('{0} {1}{2}'.format(tau, output, '\n'))
I was wondering if there are any quick ways to get python to check the first empty line when it opens the file and writes a new line there?
cc211 source share