Administrator
2023-10-09 857f47f018f5cdb84a0586ac7efe20d30a7c06db
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import importlib
import importlib.util
 
# 导入lib
import constant
 
 
def import_lib(name, only_enable_windows=True):
    if only_enable_windows:
        if not constant.is_windows():
            return None
    if importlib.util.find_spec(name):
        return importlib.import_module(name)
    return None