Locking a file in Python -


i need lock file writing in python. accessed multiple python processes @ once. have found solutions online, fail purposes unix based or windows based.

alright, ended going code wrote here, on website (also available on github). can use in following fashion:

from filelock import filelock  filelock("myfile.txt"):     # work file locked     print("lock acquired.") 

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -