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
Post a Comment