This answer contains the following line:
fcntl.lockf(fp, fcntl.LOCK_EX | fcntl.LOCK_NB)
The pipe, is in Python a "bitwise OR"
I have checked the Python docs for fcntl.lockf(fd, cmd, len=0, start=0, whence=0) and it says that cmd is one of:
LOCK_UN – unlock
LOCK_SH – acquire a shared lock
LOCK_EX – acquire an exclusive lock
Have also been reading about those variables here
Does anyone understand that line and what it does and if it would work with just one argument and no pipe symbol?
LOCK_NB is not even mentioned in the Python docs..