(name: str)
| 78 | |
| 79 | |
| 80 | def which(name: str) -> Optional[str]: |
| 81 | for p in os.environ.get("PATH", "").split(os.pathsep): |
| 82 | if not p: |
| 83 | continue |
| 84 | c = Path(p) / name |
| 85 | if c.exists() and os.access(str(c), os.X_OK): |
| 86 | return str(c) |
| 87 | return None |
| 88 | |
| 89 | |
| 90 | def is_termux() -> bool: |
no outgoing calls
no test coverage detected