What is Nostr?
Greg Wilson /
npub1gu0…g2n6
2024-05-25 19:45:13

Greg Wilson on Nostr: Using Python 3.11 or higher, I want to create an output file *and* add a line ...

Using Python 3.11 or higher, I want to create an output file *and* add a line describing it to a log file as an atomic operation: either the output file is created and the log entry is added, or neither happens. fcntl.flock() is only advisory - will something else give me stronger guarantees, preferably on all three major OSes? #python #file-lock #atomic-operation #question
Author Public Key
npub1gu0vskzadshat7g3c75ygjkan9pvfw8rwdjak2suhp79uy7qm78saxg2n6