1# DExTer : Debugging Experience Tester 2# ~~~~~~ ~ ~~ ~ ~~ 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-exception 7"""Utility functions for querying the current environment.""" 8 9import os 10 11 12def is_native_windows(): 13 return os.name == 'nt' 14 15 16def has_pywin32(): 17 try: 18 import win32com.client # pylint:disable=unused-variable 19 import win32api # pylint:disable=unused-variable 20 return True 21 except ImportError: 22 return False 23