comparison tools/effectiveT3/effectiveT3.py @ 11:ed8c1babc166 draft default tip

v0.0.21 - Added bio.tools xref
author peterjc
date Tue, 12 Mar 2024 16:04:13 +0000
parents a46d7861c32c
children
comparison
equal deleted inserted replaced
10:a46d7861c32c 11:ed8c1babc166
126 126
127 `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result 127 `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
128 of os.environ.get("PATH"), or can be overridden with a custom search 128 of os.environ.get("PATH"), or can be overridden with a custom search
129 path. 129 path.
130 """ 130 """
131
131 # Check that a given file can be accessed with the correct mode. 132 # Check that a given file can be accessed with the correct mode.
132 # Additionally check that `file` is not a directory, as on Windows 133 # Additionally check that `file` is not a directory, as on Windows
133 # directories pass the os.access check. 134 # directories pass the os.access check.
134 def _access_check(fn, mode): 135 def _access_check(fn, mode):
135 return os.path.exists(fn) and os.access(fn, mode) and not os.path.isdir(fn) 136 return os.path.exists(fn) and os.access(fn, mode) and not os.path.isdir(fn)