[python-win32] pure python way to open a file with write deny for others
Robin Becker
robin at reportlab.com
Mon Mar 9 05:05:54 EDT 2020
On 06/03/2020 21:04, Preston Landers wrote:
> Is advisory file locking an option? Such as the "portalocker" module for Python?
>
> You can have your writer process obtain an exclusive lock (and block
> until it's obtained), while the readers obtain shared locks for the
> duration of their read.
thanks, but I have no control over (and little knowledge about) the other process; the intention is to poll an output
folder for say *.txt files and post these to a web server for processing.
>
> Readers don't block other readers, while writers block both writers and readers.
>
.........
--
Robin Becker
More information about the python-win32
mailing list