Debian Codegraph @

cross-project-tests/debuginfo-tests/dexter/dex/utils/Environment.py

raw
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
9 import os
10
11
12 def is_native_windows():
13 return os.name == "nt"
14
15
16 def has_pywin32():
17 try:
18 import win32com.client # pylint:disable=unused-variable
19 import win32api # pylint:disable=unused-variable
20
21 return True
22 except ImportError:
23 return False