VT-PR/scripts/pywidevine/pywidevine/utils.py
Aswin f8c4accd54 Reset
Reset dev
2025-03-18 00:17:27 +05:30

13 lines
296 B
Python

import shutil
from pathlib import Path
from typing import Optional
def get_binary_path(*names: str) -> Optional[Path]:
"""Get the path of the first found binary name."""
for name in names:
path = shutil.which(name)
if path:
return Path(path)
return None