Skip to content

Instantly share code, notes, and snippets.

View lucaspar's full-sized avatar

Lucas Parzianello lucaspar

  • University of Notre Dame
View GitHub Profile
@lucaspar
lucaspar / flock_example.py
Last active September 6, 2025 02:06 — forked from jirihnidek/flock_example.py
Python file locking using `fcntl.flock`
#! /usr/bin/env python
"""
Example of using fcntl.flock for locking file. Some code inspired by filelock module.
"""
import fcntl
import os
import time