24 lines · python
1# DExTer : Debugging Experience Tester2# ~~~~~~ ~ ~~ ~ ~~3#4# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.5# See https://llvm.org/LICENSE.txt for license information.6# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception7"""Utility functions for querying the current environment."""8 9import os10 11 12def is_native_windows():13 return os.name == "nt"14 15 16def has_pywin32():17 try:18 import win32com.client # pylint:disable=unused-variable19 import win32api # pylint:disable=unused-variable20 21 return True22 except ImportError:23 return False24