Just to add on regarding file I/O. It would be more pythonic to use. with open(path): do_stuff()
On Wed, Feb 27, 2019, 3:31 AM Marko Rauhamaa <ma...@pacujo.net> wrote: > > Consider this function: > > def fun(): > f = open("lock") > flock.flock(f, fcntl.LOCK_EX) > do_stuff() > sys.exit(0) > > Question: can a compliant Python implementation close f (and, > consequently, release the file lock) before/while do_stuff() is > executed? > > I couldn't find an immediate answer in the documentation. > > > Marko > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list