You can use flush()
or you can set the file object to be unbuffered.
Details on using that parameter for open()
here.
So you would change your open call to –
outputFile = open("./outputFile.txt", "a", 0)
You can use flush()
or you can set the file object to be unbuffered.
Details on using that parameter for open()
here.
So you would change your open call to –
outputFile = open("./outputFile.txt", "a", 0)