Simple shelve with Linux file locking

Category: Python - Miscellaneous

The shelve module is a easy way to add persistence to your application via a DBM database. However, if you have multiple reader/writer combination you need to lock the file to prevent corruption. The shelve module itself does not provide locking because it is platform specific. If you only need Linux, this simple module provide an easy way to support locking using dynamically added methods. Date: 25 February, 2012


Dynamic Method - Locking - Shelve

Homepage: http://code.activestate.com/recipes/576591-simple-shelve-with-linux-file-locking/?in=lang-python

Developer: Michael Ihde

License: Freeware

Operating System: Windows

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

We offer beautiful free flash text effects for your web sait.

developer Developer: IntChar
license License: Freeware
operating systems Operating System: windows, linux


We offer beautiful free flash text effects for your web sait.

developer Developer: IntChar
license License: Freeware
operating systems Operating System: All


This script is a cross-platform (posix/nt) API for flock-style file locking.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


Lock NT via screensaver code implements a Python solution for locking a workstation via a secure screensaver.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


Nothing fancy here.

developer Developer: Eric Snow
license License: Freeware
operating systems Operating System: Windows


The following class implements a reader-writer lock to use in the second readers-writers problem with python threads.

developer Developer: Mateusz Kobos
license License: Freeware
operating systems Operating System: Windows


This is a C-level implementation of a fast, re-entrant, optimistic lock for CPython.

developer Developer: Stefan Behnel
license License: Freeware
operating systems Operating System: Windows


Please refer to: http://en.

developer Developer: Shao-chuan Wang
license License: Freeware
operating systems Operating System: Windows


The 3 (a UK mobile carrier) broadband dongle is handy, but its mac support is really awful.

developer Developer: Anand Patil
license License: Freeware
operating systems Operating System: Windows