(fn, mode)
| 91 | # Additionally check that `file` is not a directory, as on Windows |
| 92 | # directories pass the os.access check. |
| 93 | def _access_check(fn, mode): |
| 94 | return (os.path.exists(fn) and os.access(fn, mode) |
| 95 | and not os.path.isdir(fn)) |
| 96 | |
| 97 | # If we're given a path with a directory part, look it up directly rather |
| 98 | # than referring to PATH directories. This includes checking relative to the |