I reviewed this question. But I have another, slightly different question.
I have a script that runs several python programs (Windows os) and they write in append mode to a same file. I wanted to use some kind of lock, so when a program is writing to file, it will be locked.
In the absence of a lock, what happens if program1 is writing to file - can other programs wait until it finishes writing? Or can there be an error since the file is not accessible to other programs to write? Can you comment of good way to write file in append mode by several programs in python?