'Prepare the file locker. Specify the file to lock and optionally
the maximum timeout and the delay between each attempt to lock.'

def __init__(self, file_name, timeout=10, delay=0.05):

    self.is_locked = False
    full_path = os.path.abspath(file_name)
    self.lockfile = ('%s.lock' % full_path)
    self.file_name = full_path
    self.timeout = timeout
    self.delay = delay
