INNER CODE UNIT · Python
os_name_is_windows
cvet/fonline · BuildTools/android_device.py:48
def os_name_is_windows() -> bool:
return sys.platform == 'win32'
def run_capture(command: list[str], check: bool = True) -> str:
result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, encoding='utf-8')
output = result.stdout.strip()
if check and result.returncode != 0:
raise SystemExit(output or f'Command failed: {" ".join(command)}')
return output
def run_capture_result(command: list[str]) -> tuple[int, str]:
result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, encoding='utf-8')
return result.returncode, result.stdout.strip()
def run_passthrough(command: list[str]) -> int: