From 03a4feac9300a3ecee3acc7fa553730fb6b4fb00 Mon Sep 17 00:00:00 2001 From: Cong Date: Tue, 30 Oct 2018 09:51:23 +1100 Subject: [PATCH] Update and rename README.txt to README.md --- README.md | 20 ++++++++++++++++++++ README.txt | 11 ----------- 2 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 README.md delete mode 100644 README.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..bb5e373 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +FileLock +======== + +A file locking mechanism that has context-manager support so +you can use it in a with statement. This should be relatively cross +compatible as it doesn't rely on msvcrt or fcntl for the locking. + +Usage +===== + +```python +from filelock import FileLock + +with FileLock("myfile.txt"): + # work with the file as it is now locked + print("Lock acquired.") +``` + + +Originally posted at http://www.evanfosmark.com/2009/01/cross-platform-file-locking-support-in-python/ diff --git a/README.txt b/README.txt deleted file mode 100644 index b8d9718..0000000 --- a/README.txt +++ /dev/null @@ -1,11 +0,0 @@ - -======== -FileLock -======== - - A file locking mechanism that has context-manager support so - you can use it in a with statement. This should be relatively cross - compatible as it doesn't rely on msvcrt or fcntl for the locking. - - - Originally posted at http://www.evanfosmark.com/2009/01/cross-platform-file-locking-support-in-python/