Package omeroweb :: Package webgateway :: Module webgateway_cache :: Class AutoLockFile
[hide private]
[frames] | no frames]

Class AutoLockFile

source code


Class extends file to facilitate creation and deletion of lock file.

Instance Methods [hide private]
file object
__init__(self, fn, mode)
creates a '.lock' file with the spicified file name and mode
source code
 
__del__(self)
tries to delete the lock file
source code
None or (perhaps) an integer
close(self)
tries to delete the lock file and close the file
source code

Inherited from file: __delattr__, __enter__, __exit__, __getattribute__, __iter__, __new__, __repr__, __setattr__, fileno, flush, isatty, next, read, readinto, readline, readlines, seek, tell, truncate, write, writelines, xreadlines

Inherited from object: __format__, __hash__, __reduce__, __reduce_ex__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from file: closed, encoding, errors, mode, name, newlines, softspace

Inherited from object: __class__

Method Details [hide private]

__init__(self, fn, mode)
(Constructor)

source code 

creates a '.lock' file with the spicified file name and mode

Returns: file object
Overrides: object.__init__

close(self)

source code 

tries to delete the lock file and close the file

Returns: None or (perhaps) an integer
Overrides: file.close