(fn, mode)
| 1473 | # Additionally check that `file` is not a directory, as on Windows |
| 1474 | # directories pass the os.access check. |
| 1475 | def _access_check(fn, mode): |
| 1476 | return (os.path.exists(fn) and os.access(fn, mode) |
| 1477 | and not os.path.isdir(fn)) |
| 1478 | |
| 1479 | |
| 1480 | def which(cmd, mode=os.F_OK | os.X_OK, path=None): |