(filename, *, allowsuffix=True)
| 60 | |
| 61 | |
| 62 | def is_installed(filename, *, allowsuffix=True): |
| 63 | if not allowsuffix and filename.endswith('.py'): |
| 64 | return False |
| 65 | filename = os.path.abspath(os.path.normalize(filename)) |
| 66 | found = shutil.which(os.path.basename(filename)) |
| 67 | if not found: |
| 68 | return False |
| 69 | if found != filename: |
| 70 | return False |
| 71 | return _is_standalone(filename) |
| 72 | |
| 73 | |
| 74 | def is_standalone(filename): |
nothing calls this directly
no test coverage detected
searching dependent graphs…