def __enter__(self):
        "Enter a with-block binding the file to the as-clause target"
        if self.locked:
            return self.file
        else:
            raise RuntimeError('lockpath().file is not locked '
                               '-- cannot enter the with-block')
Enter a with-block binding the file to the as-clause target
recipes/Python/577404_fcntlflock_Unix_file_lock_behaviour_sampling/recipe-577404.py