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/