I want to detect whether a file is locked, using python on Unix. It's OK to delete the file, assuming that it helps detects whether the file was locked.
The file could have been originally opened exclusively by another process. Documentation seems to suggest that os.unlink won't necessarily return an error if the file is locked.
Ideas?