T
tinnews
This feels like it should be simple but I can't see a clean way of
doing it at the moment.
I want to retry locking a file for a number of times and then give up,
in pseudo-code it would be something like:-
for N times
try to lock file
if successful break out of for loop
if we don't have a lock then give up and exit
How does one do this tidily in python?
doing it at the moment.
I want to retry locking a file for a number of times and then give up,
in pseudo-code it would be something like:-
for N times
try to lock file
if successful break out of for loop
if we don't have a lock then give up and exit
How does one do this tidily in python?