(dll_name)
| 270 | return None |
| 271 | |
| 272 | def _find_dll_in_path(dll_name): |
| 273 | # First, look in the Python directory, then scan PATH for |
| 274 | # the given dll name. |
| 275 | for path in [sys.prefix] + os.environ['PATH'].split(';'): |
| 276 | filepath = os.path.join(path, dll_name) |
| 277 | if os.path.exists(filepath): |
| 278 | return os.path.abspath(filepath) |
| 279 | |
| 280 | return _find_dll_in_winsxs(dll_name) or _find_dll_in_path(dll_name) |
| 281 |