Skip to main content
1 of 2
spikey_richie
  • 10k
  • 4
  • 32
  • 58

Python file writes are buffered, so write() isn't called until the in-memory buffer fills, or the file is closed.

If you can edit the Python script, you should add a flush() after each write, and/or open the file in line-buffered mode

Flush:

f.write(sFileDate + ";" + sHeader)
f.write("\r\n")
f.flush()

Line-buffered mode:

f = open(sFile, "a", buffering=1)

spikey_richie
  • 10k
  • 4
  • 32
  • 58