[Python-Dev] flock in Python 3

Terry Reedy tjreedy at udel.edu
Fri Apr 11 18:35:36 CEST 2014


On 4/11/2014 8:58 AM, Jakub QB Dorňák wrote:

> writing a threaded application I've been surprised that there is no
> object api for fcntl.flock implementing __enter__() and __exit__()
> methods to be used with 'with' statement.

Several things have been turned into context managers because someone 
filed a request on the tracker. I do not see one for flock.

> I have written one
> (https://pypi.python.org/pypi), but I wonder whether this could get
> into the Python Standard Library.

It might if you open an issue and submitted a patch.

-- 
Terry Jan Reedy




More information about the Python-Dev mailing list